added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / VBUseADONET / SQLServer2005DBDataSet.Designer.vb
blob5b8c1d4dc06f206407dde13fb958a1e9e1404dff
1 '------------------------------------------------------------------------------
2 ' <auto-generated>
3 ' This code was generated by a tool.
4 ' Runtime Version:2.0.50727.4927
6 ' Changes to this file may cause incorrect behavior and will be lost if
7 ' the code is regenerated.
8 ' </auto-generated>
9 '------------------------------------------------------------------------------
11 Option Strict Off
12 Option Explicit On
16 '''<summary>
17 '''Represents a strongly typed in-memory cache of data.
18 '''</summary>
19 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
20 Global.System.Serializable(), _
21 Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
22 Global.System.ComponentModel.ToolboxItem(true), _
23 Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema"), _
24 Global.System.Xml.Serialization.XmlRootAttribute("SQLServer2005DBDataSet"), _
25 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")> _
26 Partial Public Class SQLServer2005DBDataSet
27 Inherits Global.System.Data.DataSet
29 Private tableCourse As CourseDataTable
31 Private tableCourseGrade As CourseGradeDataTable
33 Private tableCourseInstructor As CourseInstructorDataTable
35 Private tableDepartment As DepartmentDataTable
37 Private tableOfficeAssignment As OfficeAssignmentDataTable
39 Private tableOnlineCourse As OnlineCourseDataTable
41 Private tableOnsiteCourse As OnsiteCourseDataTable
43 Private tablePerson As PersonDataTable
45 Private relationFK_Course_Department As Global.System.Data.DataRelation
47 Private relationFK_CourseGrade_Course As Global.System.Data.DataRelation
49 Private relationFK_CourseGrade_Student As Global.System.Data.DataRelation
51 Private relationFK_CourseInstructor_Course As Global.System.Data.DataRelation
53 Private relationFK_CourseInstructor_Person As Global.System.Data.DataRelation
55 Private relationFK_OfficeAssignment_Person As Global.System.Data.DataRelation
57 Private relationFK_OnlineCourse_Course As Global.System.Data.DataRelation
59 Private relationFK_OnsiteCourse_Course As Global.System.Data.DataRelation
61 Private _schemaSerializationMode As Global.System.Data.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
63 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
64 Public Sub New()
65 MyBase.New
66 Me.BeginInit
67 Me.InitClass
68 Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
69 AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
70 AddHandler MyBase.Relations.CollectionChanged, schemaChangedHandler
71 Me.EndInit
72 End Sub
74 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
75 Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
76 MyBase.New(info, context, false)
77 If (Me.IsBinarySerialized(info, context) = true) Then
78 Me.InitVars(false)
79 Dim schemaChangedHandler1 As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
80 AddHandler Me.Tables.CollectionChanged, schemaChangedHandler1
81 AddHandler Me.Relations.CollectionChanged, schemaChangedHandler1
82 Return
83 End If
84 Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(String)),String)
85 If (Me.DetermineSchemaSerializationMode(info, context) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
86 Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet
87 ds.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
88 If (Not (ds.Tables("Course")) Is Nothing) Then
89 MyBase.Tables.Add(New CourseDataTable(ds.Tables("Course")))
90 End If
91 If (Not (ds.Tables("CourseGrade")) Is Nothing) Then
92 MyBase.Tables.Add(New CourseGradeDataTable(ds.Tables("CourseGrade")))
93 End If
94 If (Not (ds.Tables("CourseInstructor")) Is Nothing) Then
95 MyBase.Tables.Add(New CourseInstructorDataTable(ds.Tables("CourseInstructor")))
96 End If
97 If (Not (ds.Tables("Department")) Is Nothing) Then
98 MyBase.Tables.Add(New DepartmentDataTable(ds.Tables("Department")))
99 End If
100 If (Not (ds.Tables("OfficeAssignment")) Is Nothing) Then
101 MyBase.Tables.Add(New OfficeAssignmentDataTable(ds.Tables("OfficeAssignment")))
102 End If
103 If (Not (ds.Tables("OnlineCourse")) Is Nothing) Then
104 MyBase.Tables.Add(New OnlineCourseDataTable(ds.Tables("OnlineCourse")))
105 End If
106 If (Not (ds.Tables("OnsiteCourse")) Is Nothing) Then
107 MyBase.Tables.Add(New OnsiteCourseDataTable(ds.Tables("OnsiteCourse")))
108 End If
109 If (Not (ds.Tables("Person")) Is Nothing) Then
110 MyBase.Tables.Add(New PersonDataTable(ds.Tables("Person")))
111 End If
112 Me.DataSetName = ds.DataSetName
113 Me.Prefix = ds.Prefix
114 Me.Namespace = ds.Namespace
115 Me.Locale = ds.Locale
116 Me.CaseSensitive = ds.CaseSensitive
117 Me.EnforceConstraints = ds.EnforceConstraints
118 Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
119 Me.InitVars
120 Else
121 Me.ReadXmlSchema(New Global.System.Xml.XmlTextReader(New Global.System.IO.StringReader(strSchema)))
122 End If
123 Me.GetSerializationData(info, context)
124 Dim schemaChangedHandler As Global.System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
125 AddHandler MyBase.Tables.CollectionChanged, schemaChangedHandler
126 AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
127 End Sub
129 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
130 Global.System.ComponentModel.Browsable(false), _
131 Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
132 Public ReadOnly Property Course() As CourseDataTable
134 Return Me.tableCourse
135 End Get
136 End Property
138 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
139 Global.System.ComponentModel.Browsable(false), _
140 Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
141 Public ReadOnly Property CourseGrade() As CourseGradeDataTable
143 Return Me.tableCourseGrade
144 End Get
145 End Property
147 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
148 Global.System.ComponentModel.Browsable(false), _
149 Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
150 Public ReadOnly Property CourseInstructor() As CourseInstructorDataTable
152 Return Me.tableCourseInstructor
153 End Get
154 End Property
156 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
157 Global.System.ComponentModel.Browsable(false), _
158 Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
159 Public ReadOnly Property Department() As DepartmentDataTable
161 Return Me.tableDepartment
162 End Get
163 End Property
165 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
166 Global.System.ComponentModel.Browsable(false), _
167 Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
168 Public ReadOnly Property OfficeAssignment() As OfficeAssignmentDataTable
170 Return Me.tableOfficeAssignment
171 End Get
172 End Property
174 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
175 Global.System.ComponentModel.Browsable(false), _
176 Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
177 Public ReadOnly Property OnlineCourse() As OnlineCourseDataTable
179 Return Me.tableOnlineCourse
180 End Get
181 End Property
183 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
184 Global.System.ComponentModel.Browsable(false), _
185 Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
186 Public ReadOnly Property OnsiteCourse() As OnsiteCourseDataTable
188 Return Me.tableOnsiteCourse
189 End Get
190 End Property
192 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
193 Global.System.ComponentModel.Browsable(false), _
194 Global.System.ComponentModel.DesignerSerializationVisibility(Global.System.ComponentModel.DesignerSerializationVisibility.Content)> _
195 Public ReadOnly Property Person() As PersonDataTable
197 Return Me.tablePerson
198 End Get
199 End Property
201 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
202 Global.System.ComponentModel.BrowsableAttribute(true), _
203 Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Visible)> _
204 Public Overrides Property SchemaSerializationMode() As Global.System.Data.SchemaSerializationMode
206 Return Me._schemaSerializationMode
207 End Get
209 Me._schemaSerializationMode = value
210 End Set
211 End Property
213 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
214 Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
215 Public Shadows ReadOnly Property Tables() As Global.System.Data.DataTableCollection
217 Return MyBase.Tables
218 End Get
219 End Property
221 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
222 Global.System.ComponentModel.DesignerSerializationVisibilityAttribute(Global.System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
223 Public Shadows ReadOnly Property Relations() As Global.System.Data.DataRelationCollection
225 Return MyBase.Relations
226 End Get
227 End Property
229 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
230 Protected Overrides Sub InitializeDerivedDataSet()
231 Me.BeginInit
232 Me.InitClass
233 Me.EndInit
234 End Sub
236 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
237 Public Overrides Function Clone() As Global.System.Data.DataSet
238 Dim cln As SQLServer2005DBDataSet = CType(MyBase.Clone,SQLServer2005DBDataSet)
239 cln.InitVars
240 cln.SchemaSerializationMode = Me.SchemaSerializationMode
241 Return cln
242 End Function
244 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
245 Protected Overrides Function ShouldSerializeTables() As Boolean
246 Return false
247 End Function
249 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
250 Protected Overrides Function ShouldSerializeRelations() As Boolean
251 Return false
252 End Function
254 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
255 Protected Overrides Sub ReadXmlSerializable(ByVal reader As Global.System.Xml.XmlReader)
256 If (Me.DetermineSchemaSerializationMode(reader) = Global.System.Data.SchemaSerializationMode.IncludeSchema) Then
257 Me.Reset
258 Dim ds As Global.System.Data.DataSet = New Global.System.Data.DataSet
259 ds.ReadXml(reader)
260 If (Not (ds.Tables("Course")) Is Nothing) Then
261 MyBase.Tables.Add(New CourseDataTable(ds.Tables("Course")))
262 End If
263 If (Not (ds.Tables("CourseGrade")) Is Nothing) Then
264 MyBase.Tables.Add(New CourseGradeDataTable(ds.Tables("CourseGrade")))
265 End If
266 If (Not (ds.Tables("CourseInstructor")) Is Nothing) Then
267 MyBase.Tables.Add(New CourseInstructorDataTable(ds.Tables("CourseInstructor")))
268 End If
269 If (Not (ds.Tables("Department")) Is Nothing) Then
270 MyBase.Tables.Add(New DepartmentDataTable(ds.Tables("Department")))
271 End If
272 If (Not (ds.Tables("OfficeAssignment")) Is Nothing) Then
273 MyBase.Tables.Add(New OfficeAssignmentDataTable(ds.Tables("OfficeAssignment")))
274 End If
275 If (Not (ds.Tables("OnlineCourse")) Is Nothing) Then
276 MyBase.Tables.Add(New OnlineCourseDataTable(ds.Tables("OnlineCourse")))
277 End If
278 If (Not (ds.Tables("OnsiteCourse")) Is Nothing) Then
279 MyBase.Tables.Add(New OnsiteCourseDataTable(ds.Tables("OnsiteCourse")))
280 End If
281 If (Not (ds.Tables("Person")) Is Nothing) Then
282 MyBase.Tables.Add(New PersonDataTable(ds.Tables("Person")))
283 End If
284 Me.DataSetName = ds.DataSetName
285 Me.Prefix = ds.Prefix
286 Me.Namespace = ds.Namespace
287 Me.Locale = ds.Locale
288 Me.CaseSensitive = ds.CaseSensitive
289 Me.EnforceConstraints = ds.EnforceConstraints
290 Me.Merge(ds, false, Global.System.Data.MissingSchemaAction.Add)
291 Me.InitVars
292 Else
293 Me.ReadXml(reader)
294 Me.InitVars
295 End If
296 End Sub
298 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
299 Protected Overrides Function GetSchemaSerializable() As Global.System.Xml.Schema.XmlSchema
300 Dim stream As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
301 Me.WriteXmlSchema(New Global.System.Xml.XmlTextWriter(stream, Nothing))
302 stream.Position = 0
303 Return Global.System.Xml.Schema.XmlSchema.Read(New Global.System.Xml.XmlTextReader(stream), Nothing)
304 End Function
306 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
307 Friend Overloads Sub InitVars()
308 Me.InitVars(true)
309 End Sub
311 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
312 Friend Overloads Sub InitVars(ByVal initTable As Boolean)
313 Me.tableCourse = CType(MyBase.Tables("Course"),CourseDataTable)
314 If (initTable = true) Then
315 If (Not (Me.tableCourse) Is Nothing) Then
316 Me.tableCourse.InitVars
317 End If
318 End If
319 Me.tableCourseGrade = CType(MyBase.Tables("CourseGrade"),CourseGradeDataTable)
320 If (initTable = true) Then
321 If (Not (Me.tableCourseGrade) Is Nothing) Then
322 Me.tableCourseGrade.InitVars
323 End If
324 End If
325 Me.tableCourseInstructor = CType(MyBase.Tables("CourseInstructor"),CourseInstructorDataTable)
326 If (initTable = true) Then
327 If (Not (Me.tableCourseInstructor) Is Nothing) Then
328 Me.tableCourseInstructor.InitVars
329 End If
330 End If
331 Me.tableDepartment = CType(MyBase.Tables("Department"),DepartmentDataTable)
332 If (initTable = true) Then
333 If (Not (Me.tableDepartment) Is Nothing) Then
334 Me.tableDepartment.InitVars
335 End If
336 End If
337 Me.tableOfficeAssignment = CType(MyBase.Tables("OfficeAssignment"),OfficeAssignmentDataTable)
338 If (initTable = true) Then
339 If (Not (Me.tableOfficeAssignment) Is Nothing) Then
340 Me.tableOfficeAssignment.InitVars
341 End If
342 End If
343 Me.tableOnlineCourse = CType(MyBase.Tables("OnlineCourse"),OnlineCourseDataTable)
344 If (initTable = true) Then
345 If (Not (Me.tableOnlineCourse) Is Nothing) Then
346 Me.tableOnlineCourse.InitVars
347 End If
348 End If
349 Me.tableOnsiteCourse = CType(MyBase.Tables("OnsiteCourse"),OnsiteCourseDataTable)
350 If (initTable = true) Then
351 If (Not (Me.tableOnsiteCourse) Is Nothing) Then
352 Me.tableOnsiteCourse.InitVars
353 End If
354 End If
355 Me.tablePerson = CType(MyBase.Tables("Person"),PersonDataTable)
356 If (initTable = true) Then
357 If (Not (Me.tablePerson) Is Nothing) Then
358 Me.tablePerson.InitVars
359 End If
360 End If
361 Me.relationFK_Course_Department = Me.Relations("FK_Course_Department")
362 Me.relationFK_CourseGrade_Course = Me.Relations("FK_CourseGrade_Course")
363 Me.relationFK_CourseGrade_Student = Me.Relations("FK_CourseGrade_Student")
364 Me.relationFK_CourseInstructor_Course = Me.Relations("FK_CourseInstructor_Course")
365 Me.relationFK_CourseInstructor_Person = Me.Relations("FK_CourseInstructor_Person")
366 Me.relationFK_OfficeAssignment_Person = Me.Relations("FK_OfficeAssignment_Person")
367 Me.relationFK_OnlineCourse_Course = Me.Relations("FK_OnlineCourse_Course")
368 Me.relationFK_OnsiteCourse_Course = Me.Relations("FK_OnsiteCourse_Course")
369 End Sub
371 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
372 Private Sub InitClass()
373 Me.DataSetName = "SQLServer2005DBDataSet"
374 Me.Prefix = ""
375 Me.Namespace = "http://tempuri.org/SQLServer2005DBDataSet1.xsd"
376 Me.EnforceConstraints = true
377 Me.SchemaSerializationMode = Global.System.Data.SchemaSerializationMode.IncludeSchema
378 Me.tableCourse = New CourseDataTable
379 MyBase.Tables.Add(Me.tableCourse)
380 Me.tableCourseGrade = New CourseGradeDataTable
381 MyBase.Tables.Add(Me.tableCourseGrade)
382 Me.tableCourseInstructor = New CourseInstructorDataTable
383 MyBase.Tables.Add(Me.tableCourseInstructor)
384 Me.tableDepartment = New DepartmentDataTable
385 MyBase.Tables.Add(Me.tableDepartment)
386 Me.tableOfficeAssignment = New OfficeAssignmentDataTable
387 MyBase.Tables.Add(Me.tableOfficeAssignment)
388 Me.tableOnlineCourse = New OnlineCourseDataTable
389 MyBase.Tables.Add(Me.tableOnlineCourse)
390 Me.tableOnsiteCourse = New OnsiteCourseDataTable
391 MyBase.Tables.Add(Me.tableOnsiteCourse)
392 Me.tablePerson = New PersonDataTable
393 MyBase.Tables.Add(Me.tablePerson)
394 Me.relationFK_Course_Department = New Global.System.Data.DataRelation("FK_Course_Department", New Global.System.Data.DataColumn() {Me.tableDepartment.DepartmentIDColumn}, New Global.System.Data.DataColumn() {Me.tableCourse.DepartmentIDColumn}, false)
395 Me.Relations.Add(Me.relationFK_Course_Department)
396 Me.relationFK_CourseGrade_Course = New Global.System.Data.DataRelation("FK_CourseGrade_Course", New Global.System.Data.DataColumn() {Me.tableCourse.CourseIDColumn}, New Global.System.Data.DataColumn() {Me.tableCourseGrade.CourseIDColumn}, false)
397 Me.Relations.Add(Me.relationFK_CourseGrade_Course)
398 Me.relationFK_CourseGrade_Student = New Global.System.Data.DataRelation("FK_CourseGrade_Student", New Global.System.Data.DataColumn() {Me.tablePerson.PersonIDColumn}, New Global.System.Data.DataColumn() {Me.tableCourseGrade.StudentIDColumn}, false)
399 Me.Relations.Add(Me.relationFK_CourseGrade_Student)
400 Me.relationFK_CourseInstructor_Course = New Global.System.Data.DataRelation("FK_CourseInstructor_Course", New Global.System.Data.DataColumn() {Me.tableCourse.CourseIDColumn}, New Global.System.Data.DataColumn() {Me.tableCourseInstructor.CourseIDColumn}, false)
401 Me.Relations.Add(Me.relationFK_CourseInstructor_Course)
402 Me.relationFK_CourseInstructor_Person = New Global.System.Data.DataRelation("FK_CourseInstructor_Person", New Global.System.Data.DataColumn() {Me.tablePerson.PersonIDColumn}, New Global.System.Data.DataColumn() {Me.tableCourseInstructor.PersonIDColumn}, false)
403 Me.Relations.Add(Me.relationFK_CourseInstructor_Person)
404 Me.relationFK_OfficeAssignment_Person = New Global.System.Data.DataRelation("FK_OfficeAssignment_Person", New Global.System.Data.DataColumn() {Me.tablePerson.PersonIDColumn}, New Global.System.Data.DataColumn() {Me.tableOfficeAssignment.InstructorIDColumn}, false)
405 Me.Relations.Add(Me.relationFK_OfficeAssignment_Person)
406 Me.relationFK_OnlineCourse_Course = New Global.System.Data.DataRelation("FK_OnlineCourse_Course", New Global.System.Data.DataColumn() {Me.tableCourse.CourseIDColumn}, New Global.System.Data.DataColumn() {Me.tableOnlineCourse.CourseIDColumn}, false)
407 Me.Relations.Add(Me.relationFK_OnlineCourse_Course)
408 Me.relationFK_OnsiteCourse_Course = New Global.System.Data.DataRelation("FK_OnsiteCourse_Course", New Global.System.Data.DataColumn() {Me.tableCourse.CourseIDColumn}, New Global.System.Data.DataColumn() {Me.tableOnsiteCourse.CourseIDColumn}, false)
409 Me.Relations.Add(Me.relationFK_OnsiteCourse_Course)
410 End Sub
412 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
413 Private Function ShouldSerializeCourse() As Boolean
414 Return false
415 End Function
417 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
418 Private Function ShouldSerializeCourseGrade() As Boolean
419 Return false
420 End Function
422 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
423 Private Function ShouldSerializeCourseInstructor() As Boolean
424 Return false
425 End Function
427 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
428 Private Function ShouldSerializeDepartment() As Boolean
429 Return false
430 End Function
432 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
433 Private Function ShouldSerializeOfficeAssignment() As Boolean
434 Return false
435 End Function
437 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
438 Private Function ShouldSerializeOnlineCourse() As Boolean
439 Return false
440 End Function
442 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
443 Private Function ShouldSerializeOnsiteCourse() As Boolean
444 Return false
445 End Function
447 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
448 Private Function ShouldSerializePerson() As Boolean
449 Return false
450 End Function
452 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
453 Private Sub SchemaChanged(ByVal sender As Object, ByVal e As Global.System.ComponentModel.CollectionChangeEventArgs)
454 If (e.Action = Global.System.ComponentModel.CollectionChangeAction.Remove) Then
455 Me.InitVars
456 End If
457 End Sub
459 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
460 Public Shared Function GetTypedDataSetSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
461 Dim ds As SQLServer2005DBDataSet = New SQLServer2005DBDataSet
462 Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
463 Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
464 Dim any As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
465 any.Namespace = ds.Namespace
466 sequence.Items.Add(any)
467 type.Particle = sequence
468 Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
469 If xs.Contains(dsSchema.TargetNamespace) Then
470 Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
471 Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
472 Try
473 Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
474 dsSchema.Write(s1)
475 Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
476 Do While schemas.MoveNext
477 schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
478 s2.SetLength(0)
479 schema.Write(s2)
480 If (s1.Length = s2.Length) Then
481 s1.Position = 0
482 s2.Position = 0
484 Do While ((s1.Position <> s1.Length) _
485 AndAlso (s1.ReadByte = s2.ReadByte))
488 Loop
489 If (s1.Position = s1.Length) Then
490 Return type
491 End If
492 End If
494 Loop
495 Finally
496 If (Not (s1) Is Nothing) Then
497 s1.Close
498 End If
499 If (Not (s2) Is Nothing) Then
500 s2.Close
501 End If
502 End Try
503 End If
504 xs.Add(dsSchema)
505 Return type
506 End Function
508 Public Delegate Sub CourseRowChangeEventHandler(ByVal sender As Object, ByVal e As CourseRowChangeEvent)
510 Public Delegate Sub CourseGradeRowChangeEventHandler(ByVal sender As Object, ByVal e As CourseGradeRowChangeEvent)
512 Public Delegate Sub CourseInstructorRowChangeEventHandler(ByVal sender As Object, ByVal e As CourseInstructorRowChangeEvent)
514 Public Delegate Sub DepartmentRowChangeEventHandler(ByVal sender As Object, ByVal e As DepartmentRowChangeEvent)
516 Public Delegate Sub OfficeAssignmentRowChangeEventHandler(ByVal sender As Object, ByVal e As OfficeAssignmentRowChangeEvent)
518 Public Delegate Sub OnlineCourseRowChangeEventHandler(ByVal sender As Object, ByVal e As OnlineCourseRowChangeEvent)
520 Public Delegate Sub OnsiteCourseRowChangeEventHandler(ByVal sender As Object, ByVal e As OnsiteCourseRowChangeEvent)
522 Public Delegate Sub PersonRowChangeEventHandler(ByVal sender As Object, ByVal e As PersonRowChangeEvent)
524 '''<summary>
525 '''Represents the strongly named DataTable class.
526 '''</summary>
527 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
528 Global.System.Serializable(), _
529 Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
530 Partial Public Class CourseDataTable
531 Inherits Global.System.Data.TypedTableBase(Of CourseRow)
533 Private columnCourseID As Global.System.Data.DataColumn
535 Private columnTitle As Global.System.Data.DataColumn
537 Private columnCredits As Global.System.Data.DataColumn
539 Private columnDepartmentID As Global.System.Data.DataColumn
541 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
542 Public Sub New()
543 MyBase.New
544 Me.TableName = "Course"
545 Me.BeginInit
546 Me.InitClass
547 Me.EndInit
548 End Sub
550 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
551 Friend Sub New(ByVal table As Global.System.Data.DataTable)
552 MyBase.New
553 Me.TableName = table.TableName
554 If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
555 Me.CaseSensitive = table.CaseSensitive
556 End If
557 If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
558 Me.Locale = table.Locale
559 End If
560 If (table.Namespace <> table.DataSet.Namespace) Then
561 Me.Namespace = table.Namespace
562 End If
563 Me.Prefix = table.Prefix
564 Me.MinimumCapacity = table.MinimumCapacity
565 End Sub
567 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
568 Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
569 MyBase.New(info, context)
570 Me.InitVars
571 End Sub
573 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
574 Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
576 Return Me.columnCourseID
577 End Get
578 End Property
580 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
581 Public ReadOnly Property TitleColumn() As Global.System.Data.DataColumn
583 Return Me.columnTitle
584 End Get
585 End Property
587 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
588 Public ReadOnly Property CreditsColumn() As Global.System.Data.DataColumn
590 Return Me.columnCredits
591 End Get
592 End Property
594 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
595 Public ReadOnly Property DepartmentIDColumn() As Global.System.Data.DataColumn
597 Return Me.columnDepartmentID
598 End Get
599 End Property
601 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
602 Global.System.ComponentModel.Browsable(false)> _
603 Public ReadOnly Property Count() As Integer
605 Return Me.Rows.Count
606 End Get
607 End Property
609 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
610 Public Default ReadOnly Property Item(ByVal index As Integer) As CourseRow
612 Return CType(Me.Rows(index),CourseRow)
613 End Get
614 End Property
616 Public Event CourseRowChanging As CourseRowChangeEventHandler
618 Public Event CourseRowChanged As CourseRowChangeEventHandler
620 Public Event CourseRowDeleting As CourseRowChangeEventHandler
622 Public Event CourseRowDeleted As CourseRowChangeEventHandler
624 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
625 Public Overloads Sub AddCourseRow(ByVal row As CourseRow)
626 Me.Rows.Add(row)
627 End Sub
629 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
630 Public Overloads Function AddCourseRow(ByVal CourseID As Integer, ByVal Title As String, ByVal Credits As Integer, ByVal parentDepartmentRowByFK_Course_Department As DepartmentRow) As CourseRow
631 Dim rowCourseRow As CourseRow = CType(Me.NewRow,CourseRow)
632 Dim columnValuesArray() As Object = New Object() {CourseID, Title, Credits, Nothing}
633 If (Not (parentDepartmentRowByFK_Course_Department) Is Nothing) Then
634 columnValuesArray(3) = parentDepartmentRowByFK_Course_Department(0)
635 End If
636 rowCourseRow.ItemArray = columnValuesArray
637 Me.Rows.Add(rowCourseRow)
638 Return rowCourseRow
639 End Function
641 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
642 Public Function FindByCourseID(ByVal CourseID As Integer) As CourseRow
643 Return CType(Me.Rows.Find(New Object() {CourseID}),CourseRow)
644 End Function
646 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
647 Public Overrides Function Clone() As Global.System.Data.DataTable
648 Dim cln As CourseDataTable = CType(MyBase.Clone,CourseDataTable)
649 cln.InitVars
650 Return cln
651 End Function
653 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
654 Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
655 Return New CourseDataTable
656 End Function
658 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
659 Friend Sub InitVars()
660 Me.columnCourseID = MyBase.Columns("CourseID")
661 Me.columnTitle = MyBase.Columns("Title")
662 Me.columnCredits = MyBase.Columns("Credits")
663 Me.columnDepartmentID = MyBase.Columns("DepartmentID")
664 End Sub
666 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
667 Private Sub InitClass()
668 Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
669 MyBase.Columns.Add(Me.columnCourseID)
670 Me.columnTitle = New Global.System.Data.DataColumn("Title", GetType(String), Nothing, Global.System.Data.MappingType.Element)
671 MyBase.Columns.Add(Me.columnTitle)
672 Me.columnCredits = New Global.System.Data.DataColumn("Credits", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
673 MyBase.Columns.Add(Me.columnCredits)
674 Me.columnDepartmentID = New Global.System.Data.DataColumn("DepartmentID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
675 MyBase.Columns.Add(Me.columnDepartmentID)
676 Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnCourseID}, true))
677 Me.columnCourseID.AllowDBNull = false
678 Me.columnCourseID.Unique = true
679 Me.columnTitle.AllowDBNull = false
680 Me.columnTitle.MaxLength = 100
681 Me.columnCredits.AllowDBNull = false
682 Me.columnDepartmentID.AllowDBNull = false
683 End Sub
685 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
686 Public Function NewCourseRow() As CourseRow
687 Return CType(Me.NewRow,CourseRow)
688 End Function
690 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
691 Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
692 Return New CourseRow(builder)
693 End Function
695 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
696 Protected Overrides Function GetRowType() As Global.System.Type
697 Return GetType(CourseRow)
698 End Function
700 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
701 Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
702 MyBase.OnRowChanged(e)
703 If (Not (Me.CourseRowChangedEvent) Is Nothing) Then
704 RaiseEvent CourseRowChanged(Me, New CourseRowChangeEvent(CType(e.Row,CourseRow), e.Action))
705 End If
706 End Sub
708 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
709 Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
710 MyBase.OnRowChanging(e)
711 If (Not (Me.CourseRowChangingEvent) Is Nothing) Then
712 RaiseEvent CourseRowChanging(Me, New CourseRowChangeEvent(CType(e.Row,CourseRow), e.Action))
713 End If
714 End Sub
716 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
717 Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
718 MyBase.OnRowDeleted(e)
719 If (Not (Me.CourseRowDeletedEvent) Is Nothing) Then
720 RaiseEvent CourseRowDeleted(Me, New CourseRowChangeEvent(CType(e.Row,CourseRow), e.Action))
721 End If
722 End Sub
724 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
725 Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
726 MyBase.OnRowDeleting(e)
727 If (Not (Me.CourseRowDeletingEvent) Is Nothing) Then
728 RaiseEvent CourseRowDeleting(Me, New CourseRowChangeEvent(CType(e.Row,CourseRow), e.Action))
729 End If
730 End Sub
732 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
733 Public Sub RemoveCourseRow(ByVal row As CourseRow)
734 Me.Rows.Remove(row)
735 End Sub
737 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
738 Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
739 Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
740 Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
741 Dim ds As SQLServer2005DBDataSet = New SQLServer2005DBDataSet
742 Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
743 any1.Namespace = "http://www.w3.org/2001/XMLSchema"
744 any1.MinOccurs = New Decimal(0)
745 any1.MaxOccurs = Decimal.MaxValue
746 any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
747 sequence.Items.Add(any1)
748 Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
749 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
750 any2.MinOccurs = New Decimal(1)
751 any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
752 sequence.Items.Add(any2)
753 Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
754 attribute1.Name = "namespace"
755 attribute1.FixedValue = ds.Namespace
756 type.Attributes.Add(attribute1)
757 Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
758 attribute2.Name = "tableTypeName"
759 attribute2.FixedValue = "CourseDataTable"
760 type.Attributes.Add(attribute2)
761 type.Particle = sequence
762 Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
763 If xs.Contains(dsSchema.TargetNamespace) Then
764 Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
765 Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
766 Try
767 Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
768 dsSchema.Write(s1)
769 Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
770 Do While schemas.MoveNext
771 schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
772 s2.SetLength(0)
773 schema.Write(s2)
774 If (s1.Length = s2.Length) Then
775 s1.Position = 0
776 s2.Position = 0
778 Do While ((s1.Position <> s1.Length) _
779 AndAlso (s1.ReadByte = s2.ReadByte))
782 Loop
783 If (s1.Position = s1.Length) Then
784 Return type
785 End If
786 End If
788 Loop
789 Finally
790 If (Not (s1) Is Nothing) Then
791 s1.Close
792 End If
793 If (Not (s2) Is Nothing) Then
794 s2.Close
795 End If
796 End Try
797 End If
798 xs.Add(dsSchema)
799 Return type
800 End Function
801 End Class
803 '''<summary>
804 '''Represents the strongly named DataTable class.
805 '''</summary>
806 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
807 Global.System.Serializable(), _
808 Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
809 Partial Public Class CourseGradeDataTable
810 Inherits Global.System.Data.TypedTableBase(Of CourseGradeRow)
812 Private columnEnrollmentID As Global.System.Data.DataColumn
814 Private columnCourseID As Global.System.Data.DataColumn
816 Private columnStudentID As Global.System.Data.DataColumn
818 Private columnGrade As Global.System.Data.DataColumn
820 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
821 Public Sub New()
822 MyBase.New
823 Me.TableName = "CourseGrade"
824 Me.BeginInit
825 Me.InitClass
826 Me.EndInit
827 End Sub
829 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
830 Friend Sub New(ByVal table As Global.System.Data.DataTable)
831 MyBase.New
832 Me.TableName = table.TableName
833 If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
834 Me.CaseSensitive = table.CaseSensitive
835 End If
836 If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
837 Me.Locale = table.Locale
838 End If
839 If (table.Namespace <> table.DataSet.Namespace) Then
840 Me.Namespace = table.Namespace
841 End If
842 Me.Prefix = table.Prefix
843 Me.MinimumCapacity = table.MinimumCapacity
844 End Sub
846 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
847 Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
848 MyBase.New(info, context)
849 Me.InitVars
850 End Sub
852 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
853 Public ReadOnly Property EnrollmentIDColumn() As Global.System.Data.DataColumn
855 Return Me.columnEnrollmentID
856 End Get
857 End Property
859 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
860 Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
862 Return Me.columnCourseID
863 End Get
864 End Property
866 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
867 Public ReadOnly Property StudentIDColumn() As Global.System.Data.DataColumn
869 Return Me.columnStudentID
870 End Get
871 End Property
873 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
874 Public ReadOnly Property GradeColumn() As Global.System.Data.DataColumn
876 Return Me.columnGrade
877 End Get
878 End Property
880 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
881 Global.System.ComponentModel.Browsable(false)> _
882 Public ReadOnly Property Count() As Integer
884 Return Me.Rows.Count
885 End Get
886 End Property
888 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
889 Public Default ReadOnly Property Item(ByVal index As Integer) As CourseGradeRow
891 Return CType(Me.Rows(index),CourseGradeRow)
892 End Get
893 End Property
895 Public Event CourseGradeRowChanging As CourseGradeRowChangeEventHandler
897 Public Event CourseGradeRowChanged As CourseGradeRowChangeEventHandler
899 Public Event CourseGradeRowDeleting As CourseGradeRowChangeEventHandler
901 Public Event CourseGradeRowDeleted As CourseGradeRowChangeEventHandler
903 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
904 Public Overloads Sub AddCourseGradeRow(ByVal row As CourseGradeRow)
905 Me.Rows.Add(row)
906 End Sub
908 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
909 Public Overloads Function AddCourseGradeRow(ByVal parentCourseRowByFK_CourseGrade_Course As CourseRow, ByVal parentPersonRowByFK_CourseGrade_Student As PersonRow, ByVal Grade As Decimal) As CourseGradeRow
910 Dim rowCourseGradeRow As CourseGradeRow = CType(Me.NewRow,CourseGradeRow)
911 Dim columnValuesArray() As Object = New Object() {Nothing, Nothing, Nothing, Grade}
912 If (Not (parentCourseRowByFK_CourseGrade_Course) Is Nothing) Then
913 columnValuesArray(1) = parentCourseRowByFK_CourseGrade_Course(0)
914 End If
915 If (Not (parentPersonRowByFK_CourseGrade_Student) Is Nothing) Then
916 columnValuesArray(2) = parentPersonRowByFK_CourseGrade_Student(0)
917 End If
918 rowCourseGradeRow.ItemArray = columnValuesArray
919 Me.Rows.Add(rowCourseGradeRow)
920 Return rowCourseGradeRow
921 End Function
923 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
924 Public Function FindByEnrollmentID(ByVal EnrollmentID As Integer) As CourseGradeRow
925 Return CType(Me.Rows.Find(New Object() {EnrollmentID}),CourseGradeRow)
926 End Function
928 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
929 Public Overrides Function Clone() As Global.System.Data.DataTable
930 Dim cln As CourseGradeDataTable = CType(MyBase.Clone,CourseGradeDataTable)
931 cln.InitVars
932 Return cln
933 End Function
935 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
936 Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
937 Return New CourseGradeDataTable
938 End Function
940 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
941 Friend Sub InitVars()
942 Me.columnEnrollmentID = MyBase.Columns("EnrollmentID")
943 Me.columnCourseID = MyBase.Columns("CourseID")
944 Me.columnStudentID = MyBase.Columns("StudentID")
945 Me.columnGrade = MyBase.Columns("Grade")
946 End Sub
948 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
949 Private Sub InitClass()
950 Me.columnEnrollmentID = New Global.System.Data.DataColumn("EnrollmentID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
951 MyBase.Columns.Add(Me.columnEnrollmentID)
952 Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
953 MyBase.Columns.Add(Me.columnCourseID)
954 Me.columnStudentID = New Global.System.Data.DataColumn("StudentID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
955 MyBase.Columns.Add(Me.columnStudentID)
956 Me.columnGrade = New Global.System.Data.DataColumn("Grade", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element)
957 MyBase.Columns.Add(Me.columnGrade)
958 Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnEnrollmentID}, true))
959 Me.columnEnrollmentID.AutoIncrement = true
960 Me.columnEnrollmentID.AutoIncrementSeed = -1
961 Me.columnEnrollmentID.AutoIncrementStep = -1
962 Me.columnEnrollmentID.AllowDBNull = false
963 Me.columnEnrollmentID.ReadOnly = true
964 Me.columnEnrollmentID.Unique = true
965 Me.columnCourseID.AllowDBNull = false
966 Me.columnStudentID.AllowDBNull = false
967 End Sub
969 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
970 Public Function NewCourseGradeRow() As CourseGradeRow
971 Return CType(Me.NewRow,CourseGradeRow)
972 End Function
974 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
975 Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
976 Return New CourseGradeRow(builder)
977 End Function
979 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
980 Protected Overrides Function GetRowType() As Global.System.Type
981 Return GetType(CourseGradeRow)
982 End Function
984 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
985 Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
986 MyBase.OnRowChanged(e)
987 If (Not (Me.CourseGradeRowChangedEvent) Is Nothing) Then
988 RaiseEvent CourseGradeRowChanged(Me, New CourseGradeRowChangeEvent(CType(e.Row,CourseGradeRow), e.Action))
989 End If
990 End Sub
992 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
993 Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
994 MyBase.OnRowChanging(e)
995 If (Not (Me.CourseGradeRowChangingEvent) Is Nothing) Then
996 RaiseEvent CourseGradeRowChanging(Me, New CourseGradeRowChangeEvent(CType(e.Row,CourseGradeRow), e.Action))
997 End If
998 End Sub
1000 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1001 Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1002 MyBase.OnRowDeleted(e)
1003 If (Not (Me.CourseGradeRowDeletedEvent) Is Nothing) Then
1004 RaiseEvent CourseGradeRowDeleted(Me, New CourseGradeRowChangeEvent(CType(e.Row,CourseGradeRow), e.Action))
1005 End If
1006 End Sub
1008 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1009 Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1010 MyBase.OnRowDeleting(e)
1011 If (Not (Me.CourseGradeRowDeletingEvent) Is Nothing) Then
1012 RaiseEvent CourseGradeRowDeleting(Me, New CourseGradeRowChangeEvent(CType(e.Row,CourseGradeRow), e.Action))
1013 End If
1014 End Sub
1016 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1017 Public Sub RemoveCourseGradeRow(ByVal row As CourseGradeRow)
1018 Me.Rows.Remove(row)
1019 End Sub
1021 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1022 Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
1023 Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
1024 Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
1025 Dim ds As SQLServer2005DBDataSet = New SQLServer2005DBDataSet
1026 Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
1027 any1.Namespace = "http://www.w3.org/2001/XMLSchema"
1028 any1.MinOccurs = New Decimal(0)
1029 any1.MaxOccurs = Decimal.MaxValue
1030 any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
1031 sequence.Items.Add(any1)
1032 Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
1033 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
1034 any2.MinOccurs = New Decimal(1)
1035 any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
1036 sequence.Items.Add(any2)
1037 Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
1038 attribute1.Name = "namespace"
1039 attribute1.FixedValue = ds.Namespace
1040 type.Attributes.Add(attribute1)
1041 Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
1042 attribute2.Name = "tableTypeName"
1043 attribute2.FixedValue = "CourseGradeDataTable"
1044 type.Attributes.Add(attribute2)
1045 type.Particle = sequence
1046 Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
1047 If xs.Contains(dsSchema.TargetNamespace) Then
1048 Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
1049 Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
1050 Try
1051 Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
1052 dsSchema.Write(s1)
1053 Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
1054 Do While schemas.MoveNext
1055 schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
1056 s2.SetLength(0)
1057 schema.Write(s2)
1058 If (s1.Length = s2.Length) Then
1059 s1.Position = 0
1060 s2.Position = 0
1062 Do While ((s1.Position <> s1.Length) _
1063 AndAlso (s1.ReadByte = s2.ReadByte))
1066 Loop
1067 If (s1.Position = s1.Length) Then
1068 Return type
1069 End If
1070 End If
1072 Loop
1073 Finally
1074 If (Not (s1) Is Nothing) Then
1075 s1.Close
1076 End If
1077 If (Not (s2) Is Nothing) Then
1078 s2.Close
1079 End If
1080 End Try
1081 End If
1082 xs.Add(dsSchema)
1083 Return type
1084 End Function
1085 End Class
1087 '''<summary>
1088 '''Represents the strongly named DataTable class.
1089 '''</summary>
1090 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
1091 Global.System.Serializable(), _
1092 Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
1093 Partial Public Class CourseInstructorDataTable
1094 Inherits Global.System.Data.TypedTableBase(Of CourseInstructorRow)
1096 Private columnCourseID As Global.System.Data.DataColumn
1098 Private columnPersonID As Global.System.Data.DataColumn
1100 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1101 Public Sub New()
1102 MyBase.New
1103 Me.TableName = "CourseInstructor"
1104 Me.BeginInit
1105 Me.InitClass
1106 Me.EndInit
1107 End Sub
1109 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1110 Friend Sub New(ByVal table As Global.System.Data.DataTable)
1111 MyBase.New
1112 Me.TableName = table.TableName
1113 If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
1114 Me.CaseSensitive = table.CaseSensitive
1115 End If
1116 If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
1117 Me.Locale = table.Locale
1118 End If
1119 If (table.Namespace <> table.DataSet.Namespace) Then
1120 Me.Namespace = table.Namespace
1121 End If
1122 Me.Prefix = table.Prefix
1123 Me.MinimumCapacity = table.MinimumCapacity
1124 End Sub
1126 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1127 Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
1128 MyBase.New(info, context)
1129 Me.InitVars
1130 End Sub
1132 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1133 Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
1135 Return Me.columnCourseID
1136 End Get
1137 End Property
1139 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1140 Public ReadOnly Property PersonIDColumn() As Global.System.Data.DataColumn
1142 Return Me.columnPersonID
1143 End Get
1144 End Property
1146 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1147 Global.System.ComponentModel.Browsable(false)> _
1148 Public ReadOnly Property Count() As Integer
1150 Return Me.Rows.Count
1151 End Get
1152 End Property
1154 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1155 Public Default ReadOnly Property Item(ByVal index As Integer) As CourseInstructorRow
1157 Return CType(Me.Rows(index),CourseInstructorRow)
1158 End Get
1159 End Property
1161 Public Event CourseInstructorRowChanging As CourseInstructorRowChangeEventHandler
1163 Public Event CourseInstructorRowChanged As CourseInstructorRowChangeEventHandler
1165 Public Event CourseInstructorRowDeleting As CourseInstructorRowChangeEventHandler
1167 Public Event CourseInstructorRowDeleted As CourseInstructorRowChangeEventHandler
1169 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1170 Public Overloads Sub AddCourseInstructorRow(ByVal row As CourseInstructorRow)
1171 Me.Rows.Add(row)
1172 End Sub
1174 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1175 Public Overloads Function AddCourseInstructorRow(ByVal parentCourseRowByFK_CourseInstructor_Course As CourseRow, ByVal parentPersonRowByFK_CourseInstructor_Person As PersonRow) As CourseInstructorRow
1176 Dim rowCourseInstructorRow As CourseInstructorRow = CType(Me.NewRow,CourseInstructorRow)
1177 Dim columnValuesArray() As Object = New Object() {Nothing, Nothing}
1178 If (Not (parentCourseRowByFK_CourseInstructor_Course) Is Nothing) Then
1179 columnValuesArray(0) = parentCourseRowByFK_CourseInstructor_Course(0)
1180 End If
1181 If (Not (parentPersonRowByFK_CourseInstructor_Person) Is Nothing) Then
1182 columnValuesArray(1) = parentPersonRowByFK_CourseInstructor_Person(0)
1183 End If
1184 rowCourseInstructorRow.ItemArray = columnValuesArray
1185 Me.Rows.Add(rowCourseInstructorRow)
1186 Return rowCourseInstructorRow
1187 End Function
1189 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1190 Public Function FindByCourseIDPersonID(ByVal CourseID As Integer, ByVal PersonID As Integer) As CourseInstructorRow
1191 Return CType(Me.Rows.Find(New Object() {CourseID, PersonID}),CourseInstructorRow)
1192 End Function
1194 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1195 Public Overrides Function Clone() As Global.System.Data.DataTable
1196 Dim cln As CourseInstructorDataTable = CType(MyBase.Clone,CourseInstructorDataTable)
1197 cln.InitVars
1198 Return cln
1199 End Function
1201 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1202 Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
1203 Return New CourseInstructorDataTable
1204 End Function
1206 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1207 Friend Sub InitVars()
1208 Me.columnCourseID = MyBase.Columns("CourseID")
1209 Me.columnPersonID = MyBase.Columns("PersonID")
1210 End Sub
1212 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1213 Private Sub InitClass()
1214 Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
1215 MyBase.Columns.Add(Me.columnCourseID)
1216 Me.columnPersonID = New Global.System.Data.DataColumn("PersonID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
1217 MyBase.Columns.Add(Me.columnPersonID)
1218 Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnCourseID, Me.columnPersonID}, true))
1219 Me.columnCourseID.AllowDBNull = false
1220 Me.columnPersonID.AllowDBNull = false
1221 End Sub
1223 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1224 Public Function NewCourseInstructorRow() As CourseInstructorRow
1225 Return CType(Me.NewRow,CourseInstructorRow)
1226 End Function
1228 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1229 Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
1230 Return New CourseInstructorRow(builder)
1231 End Function
1233 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1234 Protected Overrides Function GetRowType() As Global.System.Type
1235 Return GetType(CourseInstructorRow)
1236 End Function
1238 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1239 Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1240 MyBase.OnRowChanged(e)
1241 If (Not (Me.CourseInstructorRowChangedEvent) Is Nothing) Then
1242 RaiseEvent CourseInstructorRowChanged(Me, New CourseInstructorRowChangeEvent(CType(e.Row,CourseInstructorRow), e.Action))
1243 End If
1244 End Sub
1246 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1247 Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1248 MyBase.OnRowChanging(e)
1249 If (Not (Me.CourseInstructorRowChangingEvent) Is Nothing) Then
1250 RaiseEvent CourseInstructorRowChanging(Me, New CourseInstructorRowChangeEvent(CType(e.Row,CourseInstructorRow), e.Action))
1251 End If
1252 End Sub
1254 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1255 Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1256 MyBase.OnRowDeleted(e)
1257 If (Not (Me.CourseInstructorRowDeletedEvent) Is Nothing) Then
1258 RaiseEvent CourseInstructorRowDeleted(Me, New CourseInstructorRowChangeEvent(CType(e.Row,CourseInstructorRow), e.Action))
1259 End If
1260 End Sub
1262 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1263 Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1264 MyBase.OnRowDeleting(e)
1265 If (Not (Me.CourseInstructorRowDeletingEvent) Is Nothing) Then
1266 RaiseEvent CourseInstructorRowDeleting(Me, New CourseInstructorRowChangeEvent(CType(e.Row,CourseInstructorRow), e.Action))
1267 End If
1268 End Sub
1270 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1271 Public Sub RemoveCourseInstructorRow(ByVal row As CourseInstructorRow)
1272 Me.Rows.Remove(row)
1273 End Sub
1275 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1276 Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
1277 Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
1278 Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
1279 Dim ds As SQLServer2005DBDataSet = New SQLServer2005DBDataSet
1280 Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
1281 any1.Namespace = "http://www.w3.org/2001/XMLSchema"
1282 any1.MinOccurs = New Decimal(0)
1283 any1.MaxOccurs = Decimal.MaxValue
1284 any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
1285 sequence.Items.Add(any1)
1286 Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
1287 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
1288 any2.MinOccurs = New Decimal(1)
1289 any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
1290 sequence.Items.Add(any2)
1291 Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
1292 attribute1.Name = "namespace"
1293 attribute1.FixedValue = ds.Namespace
1294 type.Attributes.Add(attribute1)
1295 Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
1296 attribute2.Name = "tableTypeName"
1297 attribute2.FixedValue = "CourseInstructorDataTable"
1298 type.Attributes.Add(attribute2)
1299 type.Particle = sequence
1300 Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
1301 If xs.Contains(dsSchema.TargetNamespace) Then
1302 Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
1303 Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
1304 Try
1305 Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
1306 dsSchema.Write(s1)
1307 Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
1308 Do While schemas.MoveNext
1309 schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
1310 s2.SetLength(0)
1311 schema.Write(s2)
1312 If (s1.Length = s2.Length) Then
1313 s1.Position = 0
1314 s2.Position = 0
1316 Do While ((s1.Position <> s1.Length) _
1317 AndAlso (s1.ReadByte = s2.ReadByte))
1320 Loop
1321 If (s1.Position = s1.Length) Then
1322 Return type
1323 End If
1324 End If
1326 Loop
1327 Finally
1328 If (Not (s1) Is Nothing) Then
1329 s1.Close
1330 End If
1331 If (Not (s2) Is Nothing) Then
1332 s2.Close
1333 End If
1334 End Try
1335 End If
1336 xs.Add(dsSchema)
1337 Return type
1338 End Function
1339 End Class
1341 '''<summary>
1342 '''Represents the strongly named DataTable class.
1343 '''</summary>
1344 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
1345 Global.System.Serializable(), _
1346 Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
1347 Partial Public Class DepartmentDataTable
1348 Inherits Global.System.Data.TypedTableBase(Of DepartmentRow)
1350 Private columnDepartmentID As Global.System.Data.DataColumn
1352 Private columnName As Global.System.Data.DataColumn
1354 Private columnBudget As Global.System.Data.DataColumn
1356 Private columnStartDate As Global.System.Data.DataColumn
1358 Private columnAdministrator As Global.System.Data.DataColumn
1360 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1361 Public Sub New()
1362 MyBase.New
1363 Me.TableName = "Department"
1364 Me.BeginInit
1365 Me.InitClass
1366 Me.EndInit
1367 End Sub
1369 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1370 Friend Sub New(ByVal table As Global.System.Data.DataTable)
1371 MyBase.New
1372 Me.TableName = table.TableName
1373 If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
1374 Me.CaseSensitive = table.CaseSensitive
1375 End If
1376 If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
1377 Me.Locale = table.Locale
1378 End If
1379 If (table.Namespace <> table.DataSet.Namespace) Then
1380 Me.Namespace = table.Namespace
1381 End If
1382 Me.Prefix = table.Prefix
1383 Me.MinimumCapacity = table.MinimumCapacity
1384 End Sub
1386 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1387 Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
1388 MyBase.New(info, context)
1389 Me.InitVars
1390 End Sub
1392 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1393 Public ReadOnly Property DepartmentIDColumn() As Global.System.Data.DataColumn
1395 Return Me.columnDepartmentID
1396 End Get
1397 End Property
1399 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1400 Public ReadOnly Property NameColumn() As Global.System.Data.DataColumn
1402 Return Me.columnName
1403 End Get
1404 End Property
1406 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1407 Public ReadOnly Property BudgetColumn() As Global.System.Data.DataColumn
1409 Return Me.columnBudget
1410 End Get
1411 End Property
1413 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1414 Public ReadOnly Property StartDateColumn() As Global.System.Data.DataColumn
1416 Return Me.columnStartDate
1417 End Get
1418 End Property
1420 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1421 Public ReadOnly Property AdministratorColumn() As Global.System.Data.DataColumn
1423 Return Me.columnAdministrator
1424 End Get
1425 End Property
1427 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1428 Global.System.ComponentModel.Browsable(false)> _
1429 Public ReadOnly Property Count() As Integer
1431 Return Me.Rows.Count
1432 End Get
1433 End Property
1435 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1436 Public Default ReadOnly Property Item(ByVal index As Integer) As DepartmentRow
1438 Return CType(Me.Rows(index),DepartmentRow)
1439 End Get
1440 End Property
1442 Public Event DepartmentRowChanging As DepartmentRowChangeEventHandler
1444 Public Event DepartmentRowChanged As DepartmentRowChangeEventHandler
1446 Public Event DepartmentRowDeleting As DepartmentRowChangeEventHandler
1448 Public Event DepartmentRowDeleted As DepartmentRowChangeEventHandler
1450 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1451 Public Overloads Sub AddDepartmentRow(ByVal row As DepartmentRow)
1452 Me.Rows.Add(row)
1453 End Sub
1455 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1456 Public Overloads Function AddDepartmentRow(ByVal DepartmentID As Integer, ByVal Name As String, ByVal Budget As Decimal, ByVal StartDate As Date, ByVal Administrator As Integer) As DepartmentRow
1457 Dim rowDepartmentRow As DepartmentRow = CType(Me.NewRow,DepartmentRow)
1458 Dim columnValuesArray() As Object = New Object() {DepartmentID, Name, Budget, StartDate, Administrator}
1459 rowDepartmentRow.ItemArray = columnValuesArray
1460 Me.Rows.Add(rowDepartmentRow)
1461 Return rowDepartmentRow
1462 End Function
1464 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1465 Public Function FindByDepartmentID(ByVal DepartmentID As Integer) As DepartmentRow
1466 Return CType(Me.Rows.Find(New Object() {DepartmentID}),DepartmentRow)
1467 End Function
1469 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1470 Public Overrides Function Clone() As Global.System.Data.DataTable
1471 Dim cln As DepartmentDataTable = CType(MyBase.Clone,DepartmentDataTable)
1472 cln.InitVars
1473 Return cln
1474 End Function
1476 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1477 Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
1478 Return New DepartmentDataTable
1479 End Function
1481 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1482 Friend Sub InitVars()
1483 Me.columnDepartmentID = MyBase.Columns("DepartmentID")
1484 Me.columnName = MyBase.Columns("Name")
1485 Me.columnBudget = MyBase.Columns("Budget")
1486 Me.columnStartDate = MyBase.Columns("StartDate")
1487 Me.columnAdministrator = MyBase.Columns("Administrator")
1488 End Sub
1490 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1491 Private Sub InitClass()
1492 Me.columnDepartmentID = New Global.System.Data.DataColumn("DepartmentID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
1493 MyBase.Columns.Add(Me.columnDepartmentID)
1494 Me.columnName = New Global.System.Data.DataColumn("Name", GetType(String), Nothing, Global.System.Data.MappingType.Element)
1495 MyBase.Columns.Add(Me.columnName)
1496 Me.columnBudget = New Global.System.Data.DataColumn("Budget", GetType(Decimal), Nothing, Global.System.Data.MappingType.Element)
1497 MyBase.Columns.Add(Me.columnBudget)
1498 Me.columnStartDate = New Global.System.Data.DataColumn("StartDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element)
1499 MyBase.Columns.Add(Me.columnStartDate)
1500 Me.columnAdministrator = New Global.System.Data.DataColumn("Administrator", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
1501 MyBase.Columns.Add(Me.columnAdministrator)
1502 Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnDepartmentID}, true))
1503 Me.columnDepartmentID.AllowDBNull = false
1504 Me.columnDepartmentID.Unique = true
1505 Me.columnName.AllowDBNull = false
1506 Me.columnName.MaxLength = 50
1507 Me.columnBudget.AllowDBNull = false
1508 Me.columnStartDate.AllowDBNull = false
1509 End Sub
1511 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1512 Public Function NewDepartmentRow() As DepartmentRow
1513 Return CType(Me.NewRow,DepartmentRow)
1514 End Function
1516 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1517 Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
1518 Return New DepartmentRow(builder)
1519 End Function
1521 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1522 Protected Overrides Function GetRowType() As Global.System.Type
1523 Return GetType(DepartmentRow)
1524 End Function
1526 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1527 Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1528 MyBase.OnRowChanged(e)
1529 If (Not (Me.DepartmentRowChangedEvent) Is Nothing) Then
1530 RaiseEvent DepartmentRowChanged(Me, New DepartmentRowChangeEvent(CType(e.Row,DepartmentRow), e.Action))
1531 End If
1532 End Sub
1534 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1535 Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1536 MyBase.OnRowChanging(e)
1537 If (Not (Me.DepartmentRowChangingEvent) Is Nothing) Then
1538 RaiseEvent DepartmentRowChanging(Me, New DepartmentRowChangeEvent(CType(e.Row,DepartmentRow), e.Action))
1539 End If
1540 End Sub
1542 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1543 Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1544 MyBase.OnRowDeleted(e)
1545 If (Not (Me.DepartmentRowDeletedEvent) Is Nothing) Then
1546 RaiseEvent DepartmentRowDeleted(Me, New DepartmentRowChangeEvent(CType(e.Row,DepartmentRow), e.Action))
1547 End If
1548 End Sub
1550 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1551 Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1552 MyBase.OnRowDeleting(e)
1553 If (Not (Me.DepartmentRowDeletingEvent) Is Nothing) Then
1554 RaiseEvent DepartmentRowDeleting(Me, New DepartmentRowChangeEvent(CType(e.Row,DepartmentRow), e.Action))
1555 End If
1556 End Sub
1558 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1559 Public Sub RemoveDepartmentRow(ByVal row As DepartmentRow)
1560 Me.Rows.Remove(row)
1561 End Sub
1563 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1564 Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
1565 Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
1566 Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
1567 Dim ds As SQLServer2005DBDataSet = New SQLServer2005DBDataSet
1568 Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
1569 any1.Namespace = "http://www.w3.org/2001/XMLSchema"
1570 any1.MinOccurs = New Decimal(0)
1571 any1.MaxOccurs = Decimal.MaxValue
1572 any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
1573 sequence.Items.Add(any1)
1574 Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
1575 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
1576 any2.MinOccurs = New Decimal(1)
1577 any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
1578 sequence.Items.Add(any2)
1579 Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
1580 attribute1.Name = "namespace"
1581 attribute1.FixedValue = ds.Namespace
1582 type.Attributes.Add(attribute1)
1583 Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
1584 attribute2.Name = "tableTypeName"
1585 attribute2.FixedValue = "DepartmentDataTable"
1586 type.Attributes.Add(attribute2)
1587 type.Particle = sequence
1588 Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
1589 If xs.Contains(dsSchema.TargetNamespace) Then
1590 Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
1591 Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
1592 Try
1593 Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
1594 dsSchema.Write(s1)
1595 Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
1596 Do While schemas.MoveNext
1597 schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
1598 s2.SetLength(0)
1599 schema.Write(s2)
1600 If (s1.Length = s2.Length) Then
1601 s1.Position = 0
1602 s2.Position = 0
1604 Do While ((s1.Position <> s1.Length) _
1605 AndAlso (s1.ReadByte = s2.ReadByte))
1608 Loop
1609 If (s1.Position = s1.Length) Then
1610 Return type
1611 End If
1612 End If
1614 Loop
1615 Finally
1616 If (Not (s1) Is Nothing) Then
1617 s1.Close
1618 End If
1619 If (Not (s2) Is Nothing) Then
1620 s2.Close
1621 End If
1622 End Try
1623 End If
1624 xs.Add(dsSchema)
1625 Return type
1626 End Function
1627 End Class
1629 '''<summary>
1630 '''Represents the strongly named DataTable class.
1631 '''</summary>
1632 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
1633 Global.System.Serializable(), _
1634 Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
1635 Partial Public Class OfficeAssignmentDataTable
1636 Inherits Global.System.Data.TypedTableBase(Of OfficeAssignmentRow)
1638 Private columnInstructorID As Global.System.Data.DataColumn
1640 Private columnLocation As Global.System.Data.DataColumn
1642 Private columnTimestamp As Global.System.Data.DataColumn
1644 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1645 Public Sub New()
1646 MyBase.New
1647 Me.TableName = "OfficeAssignment"
1648 Me.BeginInit
1649 Me.InitClass
1650 Me.EndInit
1651 End Sub
1653 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1654 Friend Sub New(ByVal table As Global.System.Data.DataTable)
1655 MyBase.New
1656 Me.TableName = table.TableName
1657 If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
1658 Me.CaseSensitive = table.CaseSensitive
1659 End If
1660 If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
1661 Me.Locale = table.Locale
1662 End If
1663 If (table.Namespace <> table.DataSet.Namespace) Then
1664 Me.Namespace = table.Namespace
1665 End If
1666 Me.Prefix = table.Prefix
1667 Me.MinimumCapacity = table.MinimumCapacity
1668 End Sub
1670 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1671 Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
1672 MyBase.New(info, context)
1673 Me.InitVars
1674 End Sub
1676 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1677 Public ReadOnly Property InstructorIDColumn() As Global.System.Data.DataColumn
1679 Return Me.columnInstructorID
1680 End Get
1681 End Property
1683 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1684 Public ReadOnly Property LocationColumn() As Global.System.Data.DataColumn
1686 Return Me.columnLocation
1687 End Get
1688 End Property
1690 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1691 Public ReadOnly Property TimestampColumn() As Global.System.Data.DataColumn
1693 Return Me.columnTimestamp
1694 End Get
1695 End Property
1697 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1698 Global.System.ComponentModel.Browsable(false)> _
1699 Public ReadOnly Property Count() As Integer
1701 Return Me.Rows.Count
1702 End Get
1703 End Property
1705 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1706 Public Default ReadOnly Property Item(ByVal index As Integer) As OfficeAssignmentRow
1708 Return CType(Me.Rows(index),OfficeAssignmentRow)
1709 End Get
1710 End Property
1712 Public Event OfficeAssignmentRowChanging As OfficeAssignmentRowChangeEventHandler
1714 Public Event OfficeAssignmentRowChanged As OfficeAssignmentRowChangeEventHandler
1716 Public Event OfficeAssignmentRowDeleting As OfficeAssignmentRowChangeEventHandler
1718 Public Event OfficeAssignmentRowDeleted As OfficeAssignmentRowChangeEventHandler
1720 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1721 Public Overloads Sub AddOfficeAssignmentRow(ByVal row As OfficeAssignmentRow)
1722 Me.Rows.Add(row)
1723 End Sub
1725 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1726 Public Overloads Function AddOfficeAssignmentRow(ByVal parentPersonRowByFK_OfficeAssignment_Person As PersonRow, ByVal Location As String, ByVal Timestamp() As Byte) As OfficeAssignmentRow
1727 Dim rowOfficeAssignmentRow As OfficeAssignmentRow = CType(Me.NewRow,OfficeAssignmentRow)
1728 Dim columnValuesArray() As Object = New Object() {Nothing, Location, Timestamp}
1729 If (Not (parentPersonRowByFK_OfficeAssignment_Person) Is Nothing) Then
1730 columnValuesArray(0) = parentPersonRowByFK_OfficeAssignment_Person(0)
1731 End If
1732 rowOfficeAssignmentRow.ItemArray = columnValuesArray
1733 Me.Rows.Add(rowOfficeAssignmentRow)
1734 Return rowOfficeAssignmentRow
1735 End Function
1737 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1738 Public Function FindByInstructorID(ByVal InstructorID As Integer) As OfficeAssignmentRow
1739 Return CType(Me.Rows.Find(New Object() {InstructorID}),OfficeAssignmentRow)
1740 End Function
1742 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1743 Public Overrides Function Clone() As Global.System.Data.DataTable
1744 Dim cln As OfficeAssignmentDataTable = CType(MyBase.Clone,OfficeAssignmentDataTable)
1745 cln.InitVars
1746 Return cln
1747 End Function
1749 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1750 Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
1751 Return New OfficeAssignmentDataTable
1752 End Function
1754 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1755 Friend Sub InitVars()
1756 Me.columnInstructorID = MyBase.Columns("InstructorID")
1757 Me.columnLocation = MyBase.Columns("Location")
1758 Me.columnTimestamp = MyBase.Columns("Timestamp")
1759 End Sub
1761 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1762 Private Sub InitClass()
1763 Me.columnInstructorID = New Global.System.Data.DataColumn("InstructorID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
1764 MyBase.Columns.Add(Me.columnInstructorID)
1765 Me.columnLocation = New Global.System.Data.DataColumn("Location", GetType(String), Nothing, Global.System.Data.MappingType.Element)
1766 MyBase.Columns.Add(Me.columnLocation)
1767 Me.columnTimestamp = New Global.System.Data.DataColumn("Timestamp", GetType(Byte()), Nothing, Global.System.Data.MappingType.Element)
1768 MyBase.Columns.Add(Me.columnTimestamp)
1769 Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnInstructorID}, true))
1770 Me.columnInstructorID.AllowDBNull = false
1771 Me.columnInstructorID.Unique = true
1772 Me.columnLocation.AllowDBNull = false
1773 Me.columnLocation.MaxLength = 50
1774 Me.columnTimestamp.ReadOnly = true
1775 End Sub
1777 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1778 Public Function NewOfficeAssignmentRow() As OfficeAssignmentRow
1779 Return CType(Me.NewRow,OfficeAssignmentRow)
1780 End Function
1782 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1783 Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
1784 Return New OfficeAssignmentRow(builder)
1785 End Function
1787 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1788 Protected Overrides Function GetRowType() As Global.System.Type
1789 Return GetType(OfficeAssignmentRow)
1790 End Function
1792 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1793 Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1794 MyBase.OnRowChanged(e)
1795 If (Not (Me.OfficeAssignmentRowChangedEvent) Is Nothing) Then
1796 RaiseEvent OfficeAssignmentRowChanged(Me, New OfficeAssignmentRowChangeEvent(CType(e.Row,OfficeAssignmentRow), e.Action))
1797 End If
1798 End Sub
1800 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1801 Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1802 MyBase.OnRowChanging(e)
1803 If (Not (Me.OfficeAssignmentRowChangingEvent) Is Nothing) Then
1804 RaiseEvent OfficeAssignmentRowChanging(Me, New OfficeAssignmentRowChangeEvent(CType(e.Row,OfficeAssignmentRow), e.Action))
1805 End If
1806 End Sub
1808 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1809 Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1810 MyBase.OnRowDeleted(e)
1811 If (Not (Me.OfficeAssignmentRowDeletedEvent) Is Nothing) Then
1812 RaiseEvent OfficeAssignmentRowDeleted(Me, New OfficeAssignmentRowChangeEvent(CType(e.Row,OfficeAssignmentRow), e.Action))
1813 End If
1814 End Sub
1816 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1817 Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
1818 MyBase.OnRowDeleting(e)
1819 If (Not (Me.OfficeAssignmentRowDeletingEvent) Is Nothing) Then
1820 RaiseEvent OfficeAssignmentRowDeleting(Me, New OfficeAssignmentRowChangeEvent(CType(e.Row,OfficeAssignmentRow), e.Action))
1821 End If
1822 End Sub
1824 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1825 Public Sub RemoveOfficeAssignmentRow(ByVal row As OfficeAssignmentRow)
1826 Me.Rows.Remove(row)
1827 End Sub
1829 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1830 Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
1831 Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
1832 Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
1833 Dim ds As SQLServer2005DBDataSet = New SQLServer2005DBDataSet
1834 Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
1835 any1.Namespace = "http://www.w3.org/2001/XMLSchema"
1836 any1.MinOccurs = New Decimal(0)
1837 any1.MaxOccurs = Decimal.MaxValue
1838 any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
1839 sequence.Items.Add(any1)
1840 Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
1841 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
1842 any2.MinOccurs = New Decimal(1)
1843 any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
1844 sequence.Items.Add(any2)
1845 Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
1846 attribute1.Name = "namespace"
1847 attribute1.FixedValue = ds.Namespace
1848 type.Attributes.Add(attribute1)
1849 Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
1850 attribute2.Name = "tableTypeName"
1851 attribute2.FixedValue = "OfficeAssignmentDataTable"
1852 type.Attributes.Add(attribute2)
1853 type.Particle = sequence
1854 Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
1855 If xs.Contains(dsSchema.TargetNamespace) Then
1856 Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
1857 Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
1858 Try
1859 Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
1860 dsSchema.Write(s1)
1861 Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
1862 Do While schemas.MoveNext
1863 schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
1864 s2.SetLength(0)
1865 schema.Write(s2)
1866 If (s1.Length = s2.Length) Then
1867 s1.Position = 0
1868 s2.Position = 0
1870 Do While ((s1.Position <> s1.Length) _
1871 AndAlso (s1.ReadByte = s2.ReadByte))
1874 Loop
1875 If (s1.Position = s1.Length) Then
1876 Return type
1877 End If
1878 End If
1880 Loop
1881 Finally
1882 If (Not (s1) Is Nothing) Then
1883 s1.Close
1884 End If
1885 If (Not (s2) Is Nothing) Then
1886 s2.Close
1887 End If
1888 End Try
1889 End If
1890 xs.Add(dsSchema)
1891 Return type
1892 End Function
1893 End Class
1895 '''<summary>
1896 '''Represents the strongly named DataTable class.
1897 '''</summary>
1898 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
1899 Global.System.Serializable(), _
1900 Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
1901 Partial Public Class OnlineCourseDataTable
1902 Inherits Global.System.Data.TypedTableBase(Of OnlineCourseRow)
1904 Private columnCourseID As Global.System.Data.DataColumn
1906 Private columnURL As Global.System.Data.DataColumn
1908 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1909 Public Sub New()
1910 MyBase.New
1911 Me.TableName = "OnlineCourse"
1912 Me.BeginInit
1913 Me.InitClass
1914 Me.EndInit
1915 End Sub
1917 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1918 Friend Sub New(ByVal table As Global.System.Data.DataTable)
1919 MyBase.New
1920 Me.TableName = table.TableName
1921 If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
1922 Me.CaseSensitive = table.CaseSensitive
1923 End If
1924 If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
1925 Me.Locale = table.Locale
1926 End If
1927 If (table.Namespace <> table.DataSet.Namespace) Then
1928 Me.Namespace = table.Namespace
1929 End If
1930 Me.Prefix = table.Prefix
1931 Me.MinimumCapacity = table.MinimumCapacity
1932 End Sub
1934 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1935 Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
1936 MyBase.New(info, context)
1937 Me.InitVars
1938 End Sub
1940 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1941 Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
1943 Return Me.columnCourseID
1944 End Get
1945 End Property
1947 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1948 Public ReadOnly Property URLColumn() As Global.System.Data.DataColumn
1950 Return Me.columnURL
1951 End Get
1952 End Property
1954 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
1955 Global.System.ComponentModel.Browsable(false)> _
1956 Public ReadOnly Property Count() As Integer
1958 Return Me.Rows.Count
1959 End Get
1960 End Property
1962 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1963 Public Default ReadOnly Property Item(ByVal index As Integer) As OnlineCourseRow
1965 Return CType(Me.Rows(index),OnlineCourseRow)
1966 End Get
1967 End Property
1969 Public Event OnlineCourseRowChanging As OnlineCourseRowChangeEventHandler
1971 Public Event OnlineCourseRowChanged As OnlineCourseRowChangeEventHandler
1973 Public Event OnlineCourseRowDeleting As OnlineCourseRowChangeEventHandler
1975 Public Event OnlineCourseRowDeleted As OnlineCourseRowChangeEventHandler
1977 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1978 Public Overloads Sub AddOnlineCourseRow(ByVal row As OnlineCourseRow)
1979 Me.Rows.Add(row)
1980 End Sub
1982 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1983 Public Overloads Function AddOnlineCourseRow(ByVal parentCourseRowByFK_OnlineCourse_Course As CourseRow, ByVal URL As String) As OnlineCourseRow
1984 Dim rowOnlineCourseRow As OnlineCourseRow = CType(Me.NewRow,OnlineCourseRow)
1985 Dim columnValuesArray() As Object = New Object() {Nothing, URL}
1986 If (Not (parentCourseRowByFK_OnlineCourse_Course) Is Nothing) Then
1987 columnValuesArray(0) = parentCourseRowByFK_OnlineCourse_Course(0)
1988 End If
1989 rowOnlineCourseRow.ItemArray = columnValuesArray
1990 Me.Rows.Add(rowOnlineCourseRow)
1991 Return rowOnlineCourseRow
1992 End Function
1994 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
1995 Public Function FindByCourseID(ByVal CourseID As Integer) As OnlineCourseRow
1996 Return CType(Me.Rows.Find(New Object() {CourseID}),OnlineCourseRow)
1997 End Function
1999 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2000 Public Overrides Function Clone() As Global.System.Data.DataTable
2001 Dim cln As OnlineCourseDataTable = CType(MyBase.Clone,OnlineCourseDataTable)
2002 cln.InitVars
2003 Return cln
2004 End Function
2006 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2007 Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
2008 Return New OnlineCourseDataTable
2009 End Function
2011 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2012 Friend Sub InitVars()
2013 Me.columnCourseID = MyBase.Columns("CourseID")
2014 Me.columnURL = MyBase.Columns("URL")
2015 End Sub
2017 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2018 Private Sub InitClass()
2019 Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
2020 MyBase.Columns.Add(Me.columnCourseID)
2021 Me.columnURL = New Global.System.Data.DataColumn("URL", GetType(String), Nothing, Global.System.Data.MappingType.Element)
2022 MyBase.Columns.Add(Me.columnURL)
2023 Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnCourseID}, true))
2024 Me.columnCourseID.AllowDBNull = false
2025 Me.columnCourseID.Unique = true
2026 Me.columnURL.AllowDBNull = false
2027 Me.columnURL.MaxLength = 100
2028 End Sub
2030 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2031 Public Function NewOnlineCourseRow() As OnlineCourseRow
2032 Return CType(Me.NewRow,OnlineCourseRow)
2033 End Function
2035 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2036 Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
2037 Return New OnlineCourseRow(builder)
2038 End Function
2040 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2041 Protected Overrides Function GetRowType() As Global.System.Type
2042 Return GetType(OnlineCourseRow)
2043 End Function
2045 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2046 Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
2047 MyBase.OnRowChanged(e)
2048 If (Not (Me.OnlineCourseRowChangedEvent) Is Nothing) Then
2049 RaiseEvent OnlineCourseRowChanged(Me, New OnlineCourseRowChangeEvent(CType(e.Row,OnlineCourseRow), e.Action))
2050 End If
2051 End Sub
2053 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2054 Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
2055 MyBase.OnRowChanging(e)
2056 If (Not (Me.OnlineCourseRowChangingEvent) Is Nothing) Then
2057 RaiseEvent OnlineCourseRowChanging(Me, New OnlineCourseRowChangeEvent(CType(e.Row,OnlineCourseRow), e.Action))
2058 End If
2059 End Sub
2061 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2062 Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
2063 MyBase.OnRowDeleted(e)
2064 If (Not (Me.OnlineCourseRowDeletedEvent) Is Nothing) Then
2065 RaiseEvent OnlineCourseRowDeleted(Me, New OnlineCourseRowChangeEvent(CType(e.Row,OnlineCourseRow), e.Action))
2066 End If
2067 End Sub
2069 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2070 Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
2071 MyBase.OnRowDeleting(e)
2072 If (Not (Me.OnlineCourseRowDeletingEvent) Is Nothing) Then
2073 RaiseEvent OnlineCourseRowDeleting(Me, New OnlineCourseRowChangeEvent(CType(e.Row,OnlineCourseRow), e.Action))
2074 End If
2075 End Sub
2077 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2078 Public Sub RemoveOnlineCourseRow(ByVal row As OnlineCourseRow)
2079 Me.Rows.Remove(row)
2080 End Sub
2082 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2083 Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
2084 Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
2085 Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
2086 Dim ds As SQLServer2005DBDataSet = New SQLServer2005DBDataSet
2087 Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
2088 any1.Namespace = "http://www.w3.org/2001/XMLSchema"
2089 any1.MinOccurs = New Decimal(0)
2090 any1.MaxOccurs = Decimal.MaxValue
2091 any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
2092 sequence.Items.Add(any1)
2093 Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
2094 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
2095 any2.MinOccurs = New Decimal(1)
2096 any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
2097 sequence.Items.Add(any2)
2098 Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
2099 attribute1.Name = "namespace"
2100 attribute1.FixedValue = ds.Namespace
2101 type.Attributes.Add(attribute1)
2102 Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
2103 attribute2.Name = "tableTypeName"
2104 attribute2.FixedValue = "OnlineCourseDataTable"
2105 type.Attributes.Add(attribute2)
2106 type.Particle = sequence
2107 Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
2108 If xs.Contains(dsSchema.TargetNamespace) Then
2109 Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
2110 Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
2111 Try
2112 Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
2113 dsSchema.Write(s1)
2114 Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
2115 Do While schemas.MoveNext
2116 schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
2117 s2.SetLength(0)
2118 schema.Write(s2)
2119 If (s1.Length = s2.Length) Then
2120 s1.Position = 0
2121 s2.Position = 0
2123 Do While ((s1.Position <> s1.Length) _
2124 AndAlso (s1.ReadByte = s2.ReadByte))
2127 Loop
2128 If (s1.Position = s1.Length) Then
2129 Return type
2130 End If
2131 End If
2133 Loop
2134 Finally
2135 If (Not (s1) Is Nothing) Then
2136 s1.Close
2137 End If
2138 If (Not (s2) Is Nothing) Then
2139 s2.Close
2140 End If
2141 End Try
2142 End If
2143 xs.Add(dsSchema)
2144 Return type
2145 End Function
2146 End Class
2148 '''<summary>
2149 '''Represents the strongly named DataTable class.
2150 '''</summary>
2151 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
2152 Global.System.Serializable(), _
2153 Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
2154 Partial Public Class OnsiteCourseDataTable
2155 Inherits Global.System.Data.TypedTableBase(Of OnsiteCourseRow)
2157 Private columnCourseID As Global.System.Data.DataColumn
2159 Private columnLocation As Global.System.Data.DataColumn
2161 Private columnDays As Global.System.Data.DataColumn
2163 Private columnTime As Global.System.Data.DataColumn
2165 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2166 Public Sub New()
2167 MyBase.New
2168 Me.TableName = "OnsiteCourse"
2169 Me.BeginInit
2170 Me.InitClass
2171 Me.EndInit
2172 End Sub
2174 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2175 Friend Sub New(ByVal table As Global.System.Data.DataTable)
2176 MyBase.New
2177 Me.TableName = table.TableName
2178 If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
2179 Me.CaseSensitive = table.CaseSensitive
2180 End If
2181 If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
2182 Me.Locale = table.Locale
2183 End If
2184 If (table.Namespace <> table.DataSet.Namespace) Then
2185 Me.Namespace = table.Namespace
2186 End If
2187 Me.Prefix = table.Prefix
2188 Me.MinimumCapacity = table.MinimumCapacity
2189 End Sub
2191 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2192 Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
2193 MyBase.New(info, context)
2194 Me.InitVars
2195 End Sub
2197 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2198 Public ReadOnly Property CourseIDColumn() As Global.System.Data.DataColumn
2200 Return Me.columnCourseID
2201 End Get
2202 End Property
2204 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2205 Public ReadOnly Property LocationColumn() As Global.System.Data.DataColumn
2207 Return Me.columnLocation
2208 End Get
2209 End Property
2211 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2212 Public ReadOnly Property DaysColumn() As Global.System.Data.DataColumn
2214 Return Me.columnDays
2215 End Get
2216 End Property
2218 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2219 Public ReadOnly Property TimeColumn() As Global.System.Data.DataColumn
2221 Return Me.columnTime
2222 End Get
2223 End Property
2225 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2226 Global.System.ComponentModel.Browsable(false)> _
2227 Public ReadOnly Property Count() As Integer
2229 Return Me.Rows.Count
2230 End Get
2231 End Property
2233 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2234 Public Default ReadOnly Property Item(ByVal index As Integer) As OnsiteCourseRow
2236 Return CType(Me.Rows(index),OnsiteCourseRow)
2237 End Get
2238 End Property
2240 Public Event OnsiteCourseRowChanging As OnsiteCourseRowChangeEventHandler
2242 Public Event OnsiteCourseRowChanged As OnsiteCourseRowChangeEventHandler
2244 Public Event OnsiteCourseRowDeleting As OnsiteCourseRowChangeEventHandler
2246 Public Event OnsiteCourseRowDeleted As OnsiteCourseRowChangeEventHandler
2248 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2249 Public Overloads Sub AddOnsiteCourseRow(ByVal row As OnsiteCourseRow)
2250 Me.Rows.Add(row)
2251 End Sub
2253 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2254 Public Overloads Function AddOnsiteCourseRow(ByVal parentCourseRowByFK_OnsiteCourse_Course As CourseRow, ByVal Location As String, ByVal Days As String, ByVal Time As Date) As OnsiteCourseRow
2255 Dim rowOnsiteCourseRow As OnsiteCourseRow = CType(Me.NewRow,OnsiteCourseRow)
2256 Dim columnValuesArray() As Object = New Object() {Nothing, Location, Days, Time}
2257 If (Not (parentCourseRowByFK_OnsiteCourse_Course) Is Nothing) Then
2258 columnValuesArray(0) = parentCourseRowByFK_OnsiteCourse_Course(0)
2259 End If
2260 rowOnsiteCourseRow.ItemArray = columnValuesArray
2261 Me.Rows.Add(rowOnsiteCourseRow)
2262 Return rowOnsiteCourseRow
2263 End Function
2265 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2266 Public Function FindByCourseID(ByVal CourseID As Integer) As OnsiteCourseRow
2267 Return CType(Me.Rows.Find(New Object() {CourseID}),OnsiteCourseRow)
2268 End Function
2270 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2271 Public Overrides Function Clone() As Global.System.Data.DataTable
2272 Dim cln As OnsiteCourseDataTable = CType(MyBase.Clone,OnsiteCourseDataTable)
2273 cln.InitVars
2274 Return cln
2275 End Function
2277 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2278 Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
2279 Return New OnsiteCourseDataTable
2280 End Function
2282 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2283 Friend Sub InitVars()
2284 Me.columnCourseID = MyBase.Columns("CourseID")
2285 Me.columnLocation = MyBase.Columns("Location")
2286 Me.columnDays = MyBase.Columns("Days")
2287 Me.columnTime = MyBase.Columns("Time")
2288 End Sub
2290 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2291 Private Sub InitClass()
2292 Me.columnCourseID = New Global.System.Data.DataColumn("CourseID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
2293 MyBase.Columns.Add(Me.columnCourseID)
2294 Me.columnLocation = New Global.System.Data.DataColumn("Location", GetType(String), Nothing, Global.System.Data.MappingType.Element)
2295 MyBase.Columns.Add(Me.columnLocation)
2296 Me.columnDays = New Global.System.Data.DataColumn("Days", GetType(String), Nothing, Global.System.Data.MappingType.Element)
2297 MyBase.Columns.Add(Me.columnDays)
2298 Me.columnTime = New Global.System.Data.DataColumn("Time", GetType(Date), Nothing, Global.System.Data.MappingType.Element)
2299 MyBase.Columns.Add(Me.columnTime)
2300 Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnCourseID}, true))
2301 Me.columnCourseID.AllowDBNull = false
2302 Me.columnCourseID.Unique = true
2303 Me.columnLocation.AllowDBNull = false
2304 Me.columnLocation.MaxLength = 50
2305 Me.columnDays.AllowDBNull = false
2306 Me.columnDays.MaxLength = 50
2307 Me.columnTime.AllowDBNull = false
2308 End Sub
2310 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2311 Public Function NewOnsiteCourseRow() As OnsiteCourseRow
2312 Return CType(Me.NewRow,OnsiteCourseRow)
2313 End Function
2315 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2316 Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
2317 Return New OnsiteCourseRow(builder)
2318 End Function
2320 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2321 Protected Overrides Function GetRowType() As Global.System.Type
2322 Return GetType(OnsiteCourseRow)
2323 End Function
2325 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2326 Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
2327 MyBase.OnRowChanged(e)
2328 If (Not (Me.OnsiteCourseRowChangedEvent) Is Nothing) Then
2329 RaiseEvent OnsiteCourseRowChanged(Me, New OnsiteCourseRowChangeEvent(CType(e.Row,OnsiteCourseRow), e.Action))
2330 End If
2331 End Sub
2333 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2334 Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
2335 MyBase.OnRowChanging(e)
2336 If (Not (Me.OnsiteCourseRowChangingEvent) Is Nothing) Then
2337 RaiseEvent OnsiteCourseRowChanging(Me, New OnsiteCourseRowChangeEvent(CType(e.Row,OnsiteCourseRow), e.Action))
2338 End If
2339 End Sub
2341 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2342 Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
2343 MyBase.OnRowDeleted(e)
2344 If (Not (Me.OnsiteCourseRowDeletedEvent) Is Nothing) Then
2345 RaiseEvent OnsiteCourseRowDeleted(Me, New OnsiteCourseRowChangeEvent(CType(e.Row,OnsiteCourseRow), e.Action))
2346 End If
2347 End Sub
2349 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2350 Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
2351 MyBase.OnRowDeleting(e)
2352 If (Not (Me.OnsiteCourseRowDeletingEvent) Is Nothing) Then
2353 RaiseEvent OnsiteCourseRowDeleting(Me, New OnsiteCourseRowChangeEvent(CType(e.Row,OnsiteCourseRow), e.Action))
2354 End If
2355 End Sub
2357 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2358 Public Sub RemoveOnsiteCourseRow(ByVal row As OnsiteCourseRow)
2359 Me.Rows.Remove(row)
2360 End Sub
2362 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2363 Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
2364 Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
2365 Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
2366 Dim ds As SQLServer2005DBDataSet = New SQLServer2005DBDataSet
2367 Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
2368 any1.Namespace = "http://www.w3.org/2001/XMLSchema"
2369 any1.MinOccurs = New Decimal(0)
2370 any1.MaxOccurs = Decimal.MaxValue
2371 any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
2372 sequence.Items.Add(any1)
2373 Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
2374 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
2375 any2.MinOccurs = New Decimal(1)
2376 any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
2377 sequence.Items.Add(any2)
2378 Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
2379 attribute1.Name = "namespace"
2380 attribute1.FixedValue = ds.Namespace
2381 type.Attributes.Add(attribute1)
2382 Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
2383 attribute2.Name = "tableTypeName"
2384 attribute2.FixedValue = "OnsiteCourseDataTable"
2385 type.Attributes.Add(attribute2)
2386 type.Particle = sequence
2387 Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
2388 If xs.Contains(dsSchema.TargetNamespace) Then
2389 Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
2390 Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
2391 Try
2392 Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
2393 dsSchema.Write(s1)
2394 Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
2395 Do While schemas.MoveNext
2396 schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
2397 s2.SetLength(0)
2398 schema.Write(s2)
2399 If (s1.Length = s2.Length) Then
2400 s1.Position = 0
2401 s2.Position = 0
2403 Do While ((s1.Position <> s1.Length) _
2404 AndAlso (s1.ReadByte = s2.ReadByte))
2407 Loop
2408 If (s1.Position = s1.Length) Then
2409 Return type
2410 End If
2411 End If
2413 Loop
2414 Finally
2415 If (Not (s1) Is Nothing) Then
2416 s1.Close
2417 End If
2418 If (Not (s2) Is Nothing) Then
2419 s2.Close
2420 End If
2421 End Try
2422 End If
2423 xs.Add(dsSchema)
2424 Return type
2425 End Function
2426 End Class
2428 '''<summary>
2429 '''Represents the strongly named DataTable class.
2430 '''</summary>
2431 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
2432 Global.System.Serializable(), _
2433 Global.System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
2434 Partial Public Class PersonDataTable
2435 Inherits Global.System.Data.TypedTableBase(Of PersonRow)
2437 Private columnPersonID As Global.System.Data.DataColumn
2439 Private columnLastName As Global.System.Data.DataColumn
2441 Private columnFirstName As Global.System.Data.DataColumn
2443 Private columnHireDate As Global.System.Data.DataColumn
2445 Private columnEnrollmentDate As Global.System.Data.DataColumn
2447 Private columnPicture As Global.System.Data.DataColumn
2449 Private columnPersonCategory As Global.System.Data.DataColumn
2451 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2452 Public Sub New()
2453 MyBase.New
2454 Me.TableName = "Person"
2455 Me.BeginInit
2456 Me.InitClass
2457 Me.EndInit
2458 End Sub
2460 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2461 Friend Sub New(ByVal table As Global.System.Data.DataTable)
2462 MyBase.New
2463 Me.TableName = table.TableName
2464 If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
2465 Me.CaseSensitive = table.CaseSensitive
2466 End If
2467 If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
2468 Me.Locale = table.Locale
2469 End If
2470 If (table.Namespace <> table.DataSet.Namespace) Then
2471 Me.Namespace = table.Namespace
2472 End If
2473 Me.Prefix = table.Prefix
2474 Me.MinimumCapacity = table.MinimumCapacity
2475 End Sub
2477 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2478 Protected Sub New(ByVal info As Global.System.Runtime.Serialization.SerializationInfo, ByVal context As Global.System.Runtime.Serialization.StreamingContext)
2479 MyBase.New(info, context)
2480 Me.InitVars
2481 End Sub
2483 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2484 Public ReadOnly Property PersonIDColumn() As Global.System.Data.DataColumn
2486 Return Me.columnPersonID
2487 End Get
2488 End Property
2490 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2491 Public ReadOnly Property LastNameColumn() As Global.System.Data.DataColumn
2493 Return Me.columnLastName
2494 End Get
2495 End Property
2497 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2498 Public ReadOnly Property FirstNameColumn() As Global.System.Data.DataColumn
2500 Return Me.columnFirstName
2501 End Get
2502 End Property
2504 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2505 Public ReadOnly Property HireDateColumn() As Global.System.Data.DataColumn
2507 Return Me.columnHireDate
2508 End Get
2509 End Property
2511 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2512 Public ReadOnly Property EnrollmentDateColumn() As Global.System.Data.DataColumn
2514 Return Me.columnEnrollmentDate
2515 End Get
2516 End Property
2518 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2519 Public ReadOnly Property PictureColumn() As Global.System.Data.DataColumn
2521 Return Me.columnPicture
2522 End Get
2523 End Property
2525 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2526 Public ReadOnly Property PersonCategoryColumn() As Global.System.Data.DataColumn
2528 Return Me.columnPersonCategory
2529 End Get
2530 End Property
2532 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
2533 Global.System.ComponentModel.Browsable(false)> _
2534 Public ReadOnly Property Count() As Integer
2536 Return Me.Rows.Count
2537 End Get
2538 End Property
2540 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2541 Public Default ReadOnly Property Item(ByVal index As Integer) As PersonRow
2543 Return CType(Me.Rows(index),PersonRow)
2544 End Get
2545 End Property
2547 Public Event PersonRowChanging As PersonRowChangeEventHandler
2549 Public Event PersonRowChanged As PersonRowChangeEventHandler
2551 Public Event PersonRowDeleting As PersonRowChangeEventHandler
2553 Public Event PersonRowDeleted As PersonRowChangeEventHandler
2555 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2556 Public Overloads Sub AddPersonRow(ByVal row As PersonRow)
2557 Me.Rows.Add(row)
2558 End Sub
2560 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2561 Public Overloads Function AddPersonRow(ByVal LastName As String, ByVal FirstName As String, ByVal HireDate As Date, ByVal EnrollmentDate As Date, ByVal Picture() As Byte, ByVal PersonCategory As Short) As PersonRow
2562 Dim rowPersonRow As PersonRow = CType(Me.NewRow,PersonRow)
2563 Dim columnValuesArray() As Object = New Object() {Nothing, LastName, FirstName, HireDate, EnrollmentDate, Picture, PersonCategory}
2564 rowPersonRow.ItemArray = columnValuesArray
2565 Me.Rows.Add(rowPersonRow)
2566 Return rowPersonRow
2567 End Function
2569 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2570 Public Function FindByPersonID(ByVal PersonID As Integer) As PersonRow
2571 Return CType(Me.Rows.Find(New Object() {PersonID}),PersonRow)
2572 End Function
2574 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2575 Public Overrides Function Clone() As Global.System.Data.DataTable
2576 Dim cln As PersonDataTable = CType(MyBase.Clone,PersonDataTable)
2577 cln.InitVars
2578 Return cln
2579 End Function
2581 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2582 Protected Overrides Function CreateInstance() As Global.System.Data.DataTable
2583 Return New PersonDataTable
2584 End Function
2586 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2587 Friend Sub InitVars()
2588 Me.columnPersonID = MyBase.Columns("PersonID")
2589 Me.columnLastName = MyBase.Columns("LastName")
2590 Me.columnFirstName = MyBase.Columns("FirstName")
2591 Me.columnHireDate = MyBase.Columns("HireDate")
2592 Me.columnEnrollmentDate = MyBase.Columns("EnrollmentDate")
2593 Me.columnPicture = MyBase.Columns("Picture")
2594 Me.columnPersonCategory = MyBase.Columns("PersonCategory")
2595 End Sub
2597 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2598 Private Sub InitClass()
2599 Me.columnPersonID = New Global.System.Data.DataColumn("PersonID", GetType(Integer), Nothing, Global.System.Data.MappingType.Element)
2600 MyBase.Columns.Add(Me.columnPersonID)
2601 Me.columnLastName = New Global.System.Data.DataColumn("LastName", GetType(String), Nothing, Global.System.Data.MappingType.Element)
2602 MyBase.Columns.Add(Me.columnLastName)
2603 Me.columnFirstName = New Global.System.Data.DataColumn("FirstName", GetType(String), Nothing, Global.System.Data.MappingType.Element)
2604 MyBase.Columns.Add(Me.columnFirstName)
2605 Me.columnHireDate = New Global.System.Data.DataColumn("HireDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element)
2606 MyBase.Columns.Add(Me.columnHireDate)
2607 Me.columnEnrollmentDate = New Global.System.Data.DataColumn("EnrollmentDate", GetType(Date), Nothing, Global.System.Data.MappingType.Element)
2608 MyBase.Columns.Add(Me.columnEnrollmentDate)
2609 Me.columnPicture = New Global.System.Data.DataColumn("Picture", GetType(Byte()), Nothing, Global.System.Data.MappingType.Element)
2610 MyBase.Columns.Add(Me.columnPicture)
2611 Me.columnPersonCategory = New Global.System.Data.DataColumn("PersonCategory", GetType(Short), Nothing, Global.System.Data.MappingType.Element)
2612 MyBase.Columns.Add(Me.columnPersonCategory)
2613 Me.Constraints.Add(New Global.System.Data.UniqueConstraint("Constraint1", New Global.System.Data.DataColumn() {Me.columnPersonID}, true))
2614 Me.columnPersonID.AutoIncrement = true
2615 Me.columnPersonID.AutoIncrementSeed = -1
2616 Me.columnPersonID.AutoIncrementStep = -1
2617 Me.columnPersonID.AllowDBNull = false
2618 Me.columnPersonID.ReadOnly = true
2619 Me.columnPersonID.Unique = true
2620 Me.columnLastName.AllowDBNull = false
2621 Me.columnLastName.MaxLength = 50
2622 Me.columnFirstName.AllowDBNull = false
2623 Me.columnFirstName.MaxLength = 50
2624 Me.columnPersonCategory.AllowDBNull = false
2625 Me.columnPersonCategory.DefaultValue = CType(1,Short)
2626 End Sub
2628 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2629 Public Function NewPersonRow() As PersonRow
2630 Return CType(Me.NewRow,PersonRow)
2631 End Function
2633 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2634 Protected Overrides Function NewRowFromBuilder(ByVal builder As Global.System.Data.DataRowBuilder) As Global.System.Data.DataRow
2635 Return New PersonRow(builder)
2636 End Function
2638 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2639 Protected Overrides Function GetRowType() As Global.System.Type
2640 Return GetType(PersonRow)
2641 End Function
2643 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2644 Protected Overrides Sub OnRowChanged(ByVal e As Global.System.Data.DataRowChangeEventArgs)
2645 MyBase.OnRowChanged(e)
2646 If (Not (Me.PersonRowChangedEvent) Is Nothing) Then
2647 RaiseEvent PersonRowChanged(Me, New PersonRowChangeEvent(CType(e.Row,PersonRow), e.Action))
2648 End If
2649 End Sub
2651 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2652 Protected Overrides Sub OnRowChanging(ByVal e As Global.System.Data.DataRowChangeEventArgs)
2653 MyBase.OnRowChanging(e)
2654 If (Not (Me.PersonRowChangingEvent) Is Nothing) Then
2655 RaiseEvent PersonRowChanging(Me, New PersonRowChangeEvent(CType(e.Row,PersonRow), e.Action))
2656 End If
2657 End Sub
2659 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2660 Protected Overrides Sub OnRowDeleted(ByVal e As Global.System.Data.DataRowChangeEventArgs)
2661 MyBase.OnRowDeleted(e)
2662 If (Not (Me.PersonRowDeletedEvent) Is Nothing) Then
2663 RaiseEvent PersonRowDeleted(Me, New PersonRowChangeEvent(CType(e.Row,PersonRow), e.Action))
2664 End If
2665 End Sub
2667 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2668 Protected Overrides Sub OnRowDeleting(ByVal e As Global.System.Data.DataRowChangeEventArgs)
2669 MyBase.OnRowDeleting(e)
2670 If (Not (Me.PersonRowDeletingEvent) Is Nothing) Then
2671 RaiseEvent PersonRowDeleting(Me, New PersonRowChangeEvent(CType(e.Row,PersonRow), e.Action))
2672 End If
2673 End Sub
2675 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2676 Public Sub RemovePersonRow(ByVal row As PersonRow)
2677 Me.Rows.Remove(row)
2678 End Sub
2680 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2681 Public Shared Function GetTypedTableSchema(ByVal xs As Global.System.Xml.Schema.XmlSchemaSet) As Global.System.Xml.Schema.XmlSchemaComplexType
2682 Dim type As Global.System.Xml.Schema.XmlSchemaComplexType = New Global.System.Xml.Schema.XmlSchemaComplexType
2683 Dim sequence As Global.System.Xml.Schema.XmlSchemaSequence = New Global.System.Xml.Schema.XmlSchemaSequence
2684 Dim ds As SQLServer2005DBDataSet = New SQLServer2005DBDataSet
2685 Dim any1 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
2686 any1.Namespace = "http://www.w3.org/2001/XMLSchema"
2687 any1.MinOccurs = New Decimal(0)
2688 any1.MaxOccurs = Decimal.MaxValue
2689 any1.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
2690 sequence.Items.Add(any1)
2691 Dim any2 As Global.System.Xml.Schema.XmlSchemaAny = New Global.System.Xml.Schema.XmlSchemaAny
2692 any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1"
2693 any2.MinOccurs = New Decimal(1)
2694 any2.ProcessContents = Global.System.Xml.Schema.XmlSchemaContentProcessing.Lax
2695 sequence.Items.Add(any2)
2696 Dim attribute1 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
2697 attribute1.Name = "namespace"
2698 attribute1.FixedValue = ds.Namespace
2699 type.Attributes.Add(attribute1)
2700 Dim attribute2 As Global.System.Xml.Schema.XmlSchemaAttribute = New Global.System.Xml.Schema.XmlSchemaAttribute
2701 attribute2.Name = "tableTypeName"
2702 attribute2.FixedValue = "PersonDataTable"
2703 type.Attributes.Add(attribute2)
2704 type.Particle = sequence
2705 Dim dsSchema As Global.System.Xml.Schema.XmlSchema = ds.GetSchemaSerializable
2706 If xs.Contains(dsSchema.TargetNamespace) Then
2707 Dim s1 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
2708 Dim s2 As Global.System.IO.MemoryStream = New Global.System.IO.MemoryStream
2709 Try
2710 Dim schema As Global.System.Xml.Schema.XmlSchema = Nothing
2711 dsSchema.Write(s1)
2712 Dim schemas As Global.System.Collections.IEnumerator = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator
2713 Do While schemas.MoveNext
2714 schema = CType(schemas.Current,Global.System.Xml.Schema.XmlSchema)
2715 s2.SetLength(0)
2716 schema.Write(s2)
2717 If (s1.Length = s2.Length) Then
2718 s1.Position = 0
2719 s2.Position = 0
2721 Do While ((s1.Position <> s1.Length) _
2722 AndAlso (s1.ReadByte = s2.ReadByte))
2725 Loop
2726 If (s1.Position = s1.Length) Then
2727 Return type
2728 End If
2729 End If
2731 Loop
2732 Finally
2733 If (Not (s1) Is Nothing) Then
2734 s1.Close
2735 End If
2736 If (Not (s2) Is Nothing) Then
2737 s2.Close
2738 End If
2739 End Try
2740 End If
2741 xs.Add(dsSchema)
2742 Return type
2743 End Function
2744 End Class
2746 '''<summary>
2747 '''Represents strongly named DataRow class.
2748 '''</summary>
2749 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
2750 Partial Public Class CourseRow
2751 Inherits Global.System.Data.DataRow
2753 Private tableCourse As CourseDataTable
2755 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2756 Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
2757 MyBase.New(rb)
2758 Me.tableCourse = CType(Me.Table,CourseDataTable)
2759 End Sub
2761 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2762 Public Property CourseID() As Integer
2764 Return CType(Me(Me.tableCourse.CourseIDColumn),Integer)
2765 End Get
2767 Me(Me.tableCourse.CourseIDColumn) = value
2768 End Set
2769 End Property
2771 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2772 Public Property Title() As String
2774 Return CType(Me(Me.tableCourse.TitleColumn),String)
2775 End Get
2777 Me(Me.tableCourse.TitleColumn) = value
2778 End Set
2779 End Property
2781 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2782 Public Property Credits() As Integer
2784 Return CType(Me(Me.tableCourse.CreditsColumn),Integer)
2785 End Get
2787 Me(Me.tableCourse.CreditsColumn) = value
2788 End Set
2789 End Property
2791 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2792 Public Property DepartmentID() As Integer
2794 Return CType(Me(Me.tableCourse.DepartmentIDColumn),Integer)
2795 End Get
2797 Me(Me.tableCourse.DepartmentIDColumn) = value
2798 End Set
2799 End Property
2801 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2802 Public Property DepartmentRow() As DepartmentRow
2804 Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_Course_Department")),DepartmentRow)
2805 End Get
2807 Me.SetParentRow(value, Me.Table.ParentRelations("FK_Course_Department"))
2808 End Set
2809 End Property
2811 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2812 Public Function GetCourseGradeRows() As CourseGradeRow()
2813 If (Me.Table.ChildRelations("FK_CourseGrade_Course") Is Nothing) Then
2814 Return New CourseGradeRow(-1) {}
2815 Else
2816 Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_CourseGrade_Course")),CourseGradeRow())
2817 End If
2818 End Function
2820 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2821 Public Function GetCourseInstructorRows() As CourseInstructorRow()
2822 If (Me.Table.ChildRelations("FK_CourseInstructor_Course") Is Nothing) Then
2823 Return New CourseInstructorRow(-1) {}
2824 Else
2825 Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_CourseInstructor_Course")),CourseInstructorRow())
2826 End If
2827 End Function
2829 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2830 Public Function GetOnlineCourseRows() As OnlineCourseRow()
2831 If (Me.Table.ChildRelations("FK_OnlineCourse_Course") Is Nothing) Then
2832 Return New OnlineCourseRow(-1) {}
2833 Else
2834 Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_OnlineCourse_Course")),OnlineCourseRow())
2835 End If
2836 End Function
2838 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2839 Public Function GetOnsiteCourseRows() As OnsiteCourseRow()
2840 If (Me.Table.ChildRelations("FK_OnsiteCourse_Course") Is Nothing) Then
2841 Return New OnsiteCourseRow(-1) {}
2842 Else
2843 Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_OnsiteCourse_Course")),OnsiteCourseRow())
2844 End If
2845 End Function
2846 End Class
2848 '''<summary>
2849 '''Represents strongly named DataRow class.
2850 '''</summary>
2851 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
2852 Partial Public Class CourseGradeRow
2853 Inherits Global.System.Data.DataRow
2855 Private tableCourseGrade As CourseGradeDataTable
2857 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2858 Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
2859 MyBase.New(rb)
2860 Me.tableCourseGrade = CType(Me.Table,CourseGradeDataTable)
2861 End Sub
2863 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2864 Public Property EnrollmentID() As Integer
2866 Return CType(Me(Me.tableCourseGrade.EnrollmentIDColumn),Integer)
2867 End Get
2869 Me(Me.tableCourseGrade.EnrollmentIDColumn) = value
2870 End Set
2871 End Property
2873 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2874 Public Property CourseID() As Integer
2876 Return CType(Me(Me.tableCourseGrade.CourseIDColumn),Integer)
2877 End Get
2879 Me(Me.tableCourseGrade.CourseIDColumn) = value
2880 End Set
2881 End Property
2883 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2884 Public Property StudentID() As Integer
2886 Return CType(Me(Me.tableCourseGrade.StudentIDColumn),Integer)
2887 End Get
2889 Me(Me.tableCourseGrade.StudentIDColumn) = value
2890 End Set
2891 End Property
2893 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2894 Public Property Grade() As Decimal
2896 Try
2897 Return CType(Me(Me.tableCourseGrade.GradeColumn),Decimal)
2898 Catch e As Global.System.InvalidCastException
2899 Throw New Global.System.Data.StrongTypingException("The value for column 'Grade' in table 'CourseGrade' is DBNull.", e)
2900 End Try
2901 End Get
2903 Me(Me.tableCourseGrade.GradeColumn) = value
2904 End Set
2905 End Property
2907 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2908 Public Property CourseRow() As CourseRow
2910 Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_CourseGrade_Course")),CourseRow)
2911 End Get
2913 Me.SetParentRow(value, Me.Table.ParentRelations("FK_CourseGrade_Course"))
2914 End Set
2915 End Property
2917 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2918 Public Property PersonRow() As PersonRow
2920 Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_CourseGrade_Student")),PersonRow)
2921 End Get
2923 Me.SetParentRow(value, Me.Table.ParentRelations("FK_CourseGrade_Student"))
2924 End Set
2925 End Property
2927 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2928 Public Function IsGradeNull() As Boolean
2929 Return Me.IsNull(Me.tableCourseGrade.GradeColumn)
2930 End Function
2932 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2933 Public Sub SetGradeNull()
2934 Me(Me.tableCourseGrade.GradeColumn) = Global.System.Convert.DBNull
2935 End Sub
2936 End Class
2938 '''<summary>
2939 '''Represents strongly named DataRow class.
2940 '''</summary>
2941 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
2942 Partial Public Class CourseInstructorRow
2943 Inherits Global.System.Data.DataRow
2945 Private tableCourseInstructor As CourseInstructorDataTable
2947 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2948 Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
2949 MyBase.New(rb)
2950 Me.tableCourseInstructor = CType(Me.Table,CourseInstructorDataTable)
2951 End Sub
2953 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2954 Public Property CourseID() As Integer
2956 Return CType(Me(Me.tableCourseInstructor.CourseIDColumn),Integer)
2957 End Get
2959 Me(Me.tableCourseInstructor.CourseIDColumn) = value
2960 End Set
2961 End Property
2963 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2964 Public Property PersonID() As Integer
2966 Return CType(Me(Me.tableCourseInstructor.PersonIDColumn),Integer)
2967 End Get
2969 Me(Me.tableCourseInstructor.PersonIDColumn) = value
2970 End Set
2971 End Property
2973 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2974 Public Property CourseRow() As CourseRow
2976 Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_CourseInstructor_Course")),CourseRow)
2977 End Get
2979 Me.SetParentRow(value, Me.Table.ParentRelations("FK_CourseInstructor_Course"))
2980 End Set
2981 End Property
2983 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
2984 Public Property PersonRow() As PersonRow
2986 Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_CourseInstructor_Person")),PersonRow)
2987 End Get
2989 Me.SetParentRow(value, Me.Table.ParentRelations("FK_CourseInstructor_Person"))
2990 End Set
2991 End Property
2992 End Class
2994 '''<summary>
2995 '''Represents strongly named DataRow class.
2996 '''</summary>
2997 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
2998 Partial Public Class DepartmentRow
2999 Inherits Global.System.Data.DataRow
3001 Private tableDepartment As DepartmentDataTable
3003 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3004 Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
3005 MyBase.New(rb)
3006 Me.tableDepartment = CType(Me.Table,DepartmentDataTable)
3007 End Sub
3009 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3010 Public Property DepartmentID() As Integer
3012 Return CType(Me(Me.tableDepartment.DepartmentIDColumn),Integer)
3013 End Get
3015 Me(Me.tableDepartment.DepartmentIDColumn) = value
3016 End Set
3017 End Property
3019 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3020 Public Property Name() As String
3022 Return CType(Me(Me.tableDepartment.NameColumn),String)
3023 End Get
3025 Me(Me.tableDepartment.NameColumn) = value
3026 End Set
3027 End Property
3029 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3030 Public Property Budget() As Decimal
3032 Return CType(Me(Me.tableDepartment.BudgetColumn),Decimal)
3033 End Get
3035 Me(Me.tableDepartment.BudgetColumn) = value
3036 End Set
3037 End Property
3039 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3040 Public Property StartDate() As Date
3042 Return CType(Me(Me.tableDepartment.StartDateColumn),Date)
3043 End Get
3045 Me(Me.tableDepartment.StartDateColumn) = value
3046 End Set
3047 End Property
3049 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3050 Public Property Administrator() As Integer
3052 Try
3053 Return CType(Me(Me.tableDepartment.AdministratorColumn),Integer)
3054 Catch e As Global.System.InvalidCastException
3055 Throw New Global.System.Data.StrongTypingException("The value for column 'Administrator' in table 'Department' is DBNull.", e)
3056 End Try
3057 End Get
3059 Me(Me.tableDepartment.AdministratorColumn) = value
3060 End Set
3061 End Property
3063 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3064 Public Function IsAdministratorNull() As Boolean
3065 Return Me.IsNull(Me.tableDepartment.AdministratorColumn)
3066 End Function
3068 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3069 Public Sub SetAdministratorNull()
3070 Me(Me.tableDepartment.AdministratorColumn) = Global.System.Convert.DBNull
3071 End Sub
3073 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3074 Public Function GetCourseRows() As CourseRow()
3075 If (Me.Table.ChildRelations("FK_Course_Department") Is Nothing) Then
3076 Return New CourseRow(-1) {}
3077 Else
3078 Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_Course_Department")),CourseRow())
3079 End If
3080 End Function
3081 End Class
3083 '''<summary>
3084 '''Represents strongly named DataRow class.
3085 '''</summary>
3086 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3087 Partial Public Class OfficeAssignmentRow
3088 Inherits Global.System.Data.DataRow
3090 Private tableOfficeAssignment As OfficeAssignmentDataTable
3092 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3093 Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
3094 MyBase.New(rb)
3095 Me.tableOfficeAssignment = CType(Me.Table,OfficeAssignmentDataTable)
3096 End Sub
3098 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3099 Public Property InstructorID() As Integer
3101 Return CType(Me(Me.tableOfficeAssignment.InstructorIDColumn),Integer)
3102 End Get
3104 Me(Me.tableOfficeAssignment.InstructorIDColumn) = value
3105 End Set
3106 End Property
3108 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3109 Public Property Location() As String
3111 Return CType(Me(Me.tableOfficeAssignment.LocationColumn),String)
3112 End Get
3114 Me(Me.tableOfficeAssignment.LocationColumn) = value
3115 End Set
3116 End Property
3118 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3119 Public Property Timestamp() As Byte()
3121 Try
3122 Return CType(Me(Me.tableOfficeAssignment.TimestampColumn),Byte())
3123 Catch e As Global.System.InvalidCastException
3124 Throw New Global.System.Data.StrongTypingException("The value for column 'Timestamp' in table 'OfficeAssignment' is DBNull.", e)
3125 End Try
3126 End Get
3128 Me(Me.tableOfficeAssignment.TimestampColumn) = value
3129 End Set
3130 End Property
3132 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3133 Public Property PersonRow() As PersonRow
3135 Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_OfficeAssignment_Person")),PersonRow)
3136 End Get
3138 Me.SetParentRow(value, Me.Table.ParentRelations("FK_OfficeAssignment_Person"))
3139 End Set
3140 End Property
3142 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3143 Public Function IsTimestampNull() As Boolean
3144 Return Me.IsNull(Me.tableOfficeAssignment.TimestampColumn)
3145 End Function
3147 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3148 Public Sub SetTimestampNull()
3149 Me(Me.tableOfficeAssignment.TimestampColumn) = Global.System.Convert.DBNull
3150 End Sub
3151 End Class
3153 '''<summary>
3154 '''Represents strongly named DataRow class.
3155 '''</summary>
3156 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3157 Partial Public Class OnlineCourseRow
3158 Inherits Global.System.Data.DataRow
3160 Private tableOnlineCourse As OnlineCourseDataTable
3162 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3163 Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
3164 MyBase.New(rb)
3165 Me.tableOnlineCourse = CType(Me.Table,OnlineCourseDataTable)
3166 End Sub
3168 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3169 Public Property CourseID() As Integer
3171 Return CType(Me(Me.tableOnlineCourse.CourseIDColumn),Integer)
3172 End Get
3174 Me(Me.tableOnlineCourse.CourseIDColumn) = value
3175 End Set
3176 End Property
3178 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3179 Public Property URL() As String
3181 Return CType(Me(Me.tableOnlineCourse.URLColumn),String)
3182 End Get
3184 Me(Me.tableOnlineCourse.URLColumn) = value
3185 End Set
3186 End Property
3188 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3189 Public Property CourseRow() As CourseRow
3191 Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_OnlineCourse_Course")),CourseRow)
3192 End Get
3194 Me.SetParentRow(value, Me.Table.ParentRelations("FK_OnlineCourse_Course"))
3195 End Set
3196 End Property
3197 End Class
3199 '''<summary>
3200 '''Represents strongly named DataRow class.
3201 '''</summary>
3202 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3203 Partial Public Class OnsiteCourseRow
3204 Inherits Global.System.Data.DataRow
3206 Private tableOnsiteCourse As OnsiteCourseDataTable
3208 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3209 Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
3210 MyBase.New(rb)
3211 Me.tableOnsiteCourse = CType(Me.Table,OnsiteCourseDataTable)
3212 End Sub
3214 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3215 Public Property CourseID() As Integer
3217 Return CType(Me(Me.tableOnsiteCourse.CourseIDColumn),Integer)
3218 End Get
3220 Me(Me.tableOnsiteCourse.CourseIDColumn) = value
3221 End Set
3222 End Property
3224 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3225 Public Property Location() As String
3227 Return CType(Me(Me.tableOnsiteCourse.LocationColumn),String)
3228 End Get
3230 Me(Me.tableOnsiteCourse.LocationColumn) = value
3231 End Set
3232 End Property
3234 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3235 Public Property Days() As String
3237 Return CType(Me(Me.tableOnsiteCourse.DaysColumn),String)
3238 End Get
3240 Me(Me.tableOnsiteCourse.DaysColumn) = value
3241 End Set
3242 End Property
3244 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3245 Public Property Time() As Date
3247 Return CType(Me(Me.tableOnsiteCourse.TimeColumn),Date)
3248 End Get
3250 Me(Me.tableOnsiteCourse.TimeColumn) = value
3251 End Set
3252 End Property
3254 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3255 Public Property CourseRow() As CourseRow
3257 Return CType(Me.GetParentRow(Me.Table.ParentRelations("FK_OnsiteCourse_Course")),CourseRow)
3258 End Get
3260 Me.SetParentRow(value, Me.Table.ParentRelations("FK_OnsiteCourse_Course"))
3261 End Set
3262 End Property
3263 End Class
3265 '''<summary>
3266 '''Represents strongly named DataRow class.
3267 '''</summary>
3268 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3269 Partial Public Class PersonRow
3270 Inherits Global.System.Data.DataRow
3272 Private tablePerson As PersonDataTable
3274 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3275 Friend Sub New(ByVal rb As Global.System.Data.DataRowBuilder)
3276 MyBase.New(rb)
3277 Me.tablePerson = CType(Me.Table,PersonDataTable)
3278 End Sub
3280 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3281 Public Property PersonID() As Integer
3283 Return CType(Me(Me.tablePerson.PersonIDColumn),Integer)
3284 End Get
3286 Me(Me.tablePerson.PersonIDColumn) = value
3287 End Set
3288 End Property
3290 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3291 Public Property LastName() As String
3293 Return CType(Me(Me.tablePerson.LastNameColumn),String)
3294 End Get
3296 Me(Me.tablePerson.LastNameColumn) = value
3297 End Set
3298 End Property
3300 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3301 Public Property FirstName() As String
3303 Return CType(Me(Me.tablePerson.FirstNameColumn),String)
3304 End Get
3306 Me(Me.tablePerson.FirstNameColumn) = value
3307 End Set
3308 End Property
3310 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3311 Public Property HireDate() As Date
3313 Try
3314 Return CType(Me(Me.tablePerson.HireDateColumn),Date)
3315 Catch e As Global.System.InvalidCastException
3316 Throw New Global.System.Data.StrongTypingException("The value for column 'HireDate' in table 'Person' is DBNull.", e)
3317 End Try
3318 End Get
3320 Me(Me.tablePerson.HireDateColumn) = value
3321 End Set
3322 End Property
3324 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3325 Public Property EnrollmentDate() As Date
3327 Try
3328 Return CType(Me(Me.tablePerson.EnrollmentDateColumn),Date)
3329 Catch e As Global.System.InvalidCastException
3330 Throw New Global.System.Data.StrongTypingException("The value for column 'EnrollmentDate' in table 'Person' is DBNull.", e)
3331 End Try
3332 End Get
3334 Me(Me.tablePerson.EnrollmentDateColumn) = value
3335 End Set
3336 End Property
3338 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3339 Public Property Picture() As Byte()
3341 Try
3342 Return CType(Me(Me.tablePerson.PictureColumn),Byte())
3343 Catch e As Global.System.InvalidCastException
3344 Throw New Global.System.Data.StrongTypingException("The value for column 'Picture' in table 'Person' is DBNull.", e)
3345 End Try
3346 End Get
3348 Me(Me.tablePerson.PictureColumn) = value
3349 End Set
3350 End Property
3352 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3353 Public Property PersonCategory() As Short
3355 Return CType(Me(Me.tablePerson.PersonCategoryColumn),Short)
3356 End Get
3358 Me(Me.tablePerson.PersonCategoryColumn) = value
3359 End Set
3360 End Property
3362 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3363 Public Function IsHireDateNull() As Boolean
3364 Return Me.IsNull(Me.tablePerson.HireDateColumn)
3365 End Function
3367 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3368 Public Sub SetHireDateNull()
3369 Me(Me.tablePerson.HireDateColumn) = Global.System.Convert.DBNull
3370 End Sub
3372 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3373 Public Function IsEnrollmentDateNull() As Boolean
3374 Return Me.IsNull(Me.tablePerson.EnrollmentDateColumn)
3375 End Function
3377 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3378 Public Sub SetEnrollmentDateNull()
3379 Me(Me.tablePerson.EnrollmentDateColumn) = Global.System.Convert.DBNull
3380 End Sub
3382 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3383 Public Function IsPictureNull() As Boolean
3384 Return Me.IsNull(Me.tablePerson.PictureColumn)
3385 End Function
3387 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3388 Public Sub SetPictureNull()
3389 Me(Me.tablePerson.PictureColumn) = Global.System.Convert.DBNull
3390 End Sub
3392 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3393 Public Function GetCourseGradeRows() As CourseGradeRow()
3394 If (Me.Table.ChildRelations("FK_CourseGrade_Student") Is Nothing) Then
3395 Return New CourseGradeRow(-1) {}
3396 Else
3397 Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_CourseGrade_Student")),CourseGradeRow())
3398 End If
3399 End Function
3401 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3402 Public Function GetCourseInstructorRows() As CourseInstructorRow()
3403 If (Me.Table.ChildRelations("FK_CourseInstructor_Person") Is Nothing) Then
3404 Return New CourseInstructorRow(-1) {}
3405 Else
3406 Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_CourseInstructor_Person")),CourseInstructorRow())
3407 End If
3408 End Function
3410 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3411 Public Function GetOfficeAssignmentRows() As OfficeAssignmentRow()
3412 If (Me.Table.ChildRelations("FK_OfficeAssignment_Person") Is Nothing) Then
3413 Return New OfficeAssignmentRow(-1) {}
3414 Else
3415 Return CType(MyBase.GetChildRows(Me.Table.ChildRelations("FK_OfficeAssignment_Person")),OfficeAssignmentRow())
3416 End If
3417 End Function
3418 End Class
3420 '''<summary>
3421 '''Row event argument class
3422 '''</summary>
3423 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3424 Public Class CourseRowChangeEvent
3425 Inherits Global.System.EventArgs
3427 Private eventRow As CourseRow
3429 Private eventAction As Global.System.Data.DataRowAction
3431 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3432 Public Sub New(ByVal row As CourseRow, ByVal action As Global.System.Data.DataRowAction)
3433 MyBase.New
3434 Me.eventRow = row
3435 Me.eventAction = action
3436 End Sub
3438 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3439 Public ReadOnly Property Row() As CourseRow
3441 Return Me.eventRow
3442 End Get
3443 End Property
3445 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3446 Public ReadOnly Property Action() As Global.System.Data.DataRowAction
3448 Return Me.eventAction
3449 End Get
3450 End Property
3451 End Class
3453 '''<summary>
3454 '''Row event argument class
3455 '''</summary>
3456 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3457 Public Class CourseGradeRowChangeEvent
3458 Inherits Global.System.EventArgs
3460 Private eventRow As CourseGradeRow
3462 Private eventAction As Global.System.Data.DataRowAction
3464 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3465 Public Sub New(ByVal row As CourseGradeRow, ByVal action As Global.System.Data.DataRowAction)
3466 MyBase.New
3467 Me.eventRow = row
3468 Me.eventAction = action
3469 End Sub
3471 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3472 Public ReadOnly Property Row() As CourseGradeRow
3474 Return Me.eventRow
3475 End Get
3476 End Property
3478 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3479 Public ReadOnly Property Action() As Global.System.Data.DataRowAction
3481 Return Me.eventAction
3482 End Get
3483 End Property
3484 End Class
3486 '''<summary>
3487 '''Row event argument class
3488 '''</summary>
3489 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3490 Public Class CourseInstructorRowChangeEvent
3491 Inherits Global.System.EventArgs
3493 Private eventRow As CourseInstructorRow
3495 Private eventAction As Global.System.Data.DataRowAction
3497 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3498 Public Sub New(ByVal row As CourseInstructorRow, ByVal action As Global.System.Data.DataRowAction)
3499 MyBase.New
3500 Me.eventRow = row
3501 Me.eventAction = action
3502 End Sub
3504 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3505 Public ReadOnly Property Row() As CourseInstructorRow
3507 Return Me.eventRow
3508 End Get
3509 End Property
3511 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3512 Public ReadOnly Property Action() As Global.System.Data.DataRowAction
3514 Return Me.eventAction
3515 End Get
3516 End Property
3517 End Class
3519 '''<summary>
3520 '''Row event argument class
3521 '''</summary>
3522 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3523 Public Class DepartmentRowChangeEvent
3524 Inherits Global.System.EventArgs
3526 Private eventRow As DepartmentRow
3528 Private eventAction As Global.System.Data.DataRowAction
3530 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3531 Public Sub New(ByVal row As DepartmentRow, ByVal action As Global.System.Data.DataRowAction)
3532 MyBase.New
3533 Me.eventRow = row
3534 Me.eventAction = action
3535 End Sub
3537 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3538 Public ReadOnly Property Row() As DepartmentRow
3540 Return Me.eventRow
3541 End Get
3542 End Property
3544 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3545 Public ReadOnly Property Action() As Global.System.Data.DataRowAction
3547 Return Me.eventAction
3548 End Get
3549 End Property
3550 End Class
3552 '''<summary>
3553 '''Row event argument class
3554 '''</summary>
3555 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3556 Public Class OfficeAssignmentRowChangeEvent
3557 Inherits Global.System.EventArgs
3559 Private eventRow As OfficeAssignmentRow
3561 Private eventAction As Global.System.Data.DataRowAction
3563 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3564 Public Sub New(ByVal row As OfficeAssignmentRow, ByVal action As Global.System.Data.DataRowAction)
3565 MyBase.New
3566 Me.eventRow = row
3567 Me.eventAction = action
3568 End Sub
3570 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3571 Public ReadOnly Property Row() As OfficeAssignmentRow
3573 Return Me.eventRow
3574 End Get
3575 End Property
3577 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3578 Public ReadOnly Property Action() As Global.System.Data.DataRowAction
3580 Return Me.eventAction
3581 End Get
3582 End Property
3583 End Class
3585 '''<summary>
3586 '''Row event argument class
3587 '''</summary>
3588 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3589 Public Class OnlineCourseRowChangeEvent
3590 Inherits Global.System.EventArgs
3592 Private eventRow As OnlineCourseRow
3594 Private eventAction As Global.System.Data.DataRowAction
3596 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3597 Public Sub New(ByVal row As OnlineCourseRow, ByVal action As Global.System.Data.DataRowAction)
3598 MyBase.New
3599 Me.eventRow = row
3600 Me.eventAction = action
3601 End Sub
3603 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3604 Public ReadOnly Property Row() As OnlineCourseRow
3606 Return Me.eventRow
3607 End Get
3608 End Property
3610 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3611 Public ReadOnly Property Action() As Global.System.Data.DataRowAction
3613 Return Me.eventAction
3614 End Get
3615 End Property
3616 End Class
3618 '''<summary>
3619 '''Row event argument class
3620 '''</summary>
3621 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3622 Public Class OnsiteCourseRowChangeEvent
3623 Inherits Global.System.EventArgs
3625 Private eventRow As OnsiteCourseRow
3627 Private eventAction As Global.System.Data.DataRowAction
3629 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3630 Public Sub New(ByVal row As OnsiteCourseRow, ByVal action As Global.System.Data.DataRowAction)
3631 MyBase.New
3632 Me.eventRow = row
3633 Me.eventAction = action
3634 End Sub
3636 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3637 Public ReadOnly Property Row() As OnsiteCourseRow
3639 Return Me.eventRow
3640 End Get
3641 End Property
3643 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3644 Public ReadOnly Property Action() As Global.System.Data.DataRowAction
3646 Return Me.eventAction
3647 End Get
3648 End Property
3649 End Class
3651 '''<summary>
3652 '''Row event argument class
3653 '''</summary>
3654 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3655 Public Class PersonRowChangeEvent
3656 Inherits Global.System.EventArgs
3658 Private eventRow As PersonRow
3660 Private eventAction As Global.System.Data.DataRowAction
3662 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3663 Public Sub New(ByVal row As PersonRow, ByVal action As Global.System.Data.DataRowAction)
3664 MyBase.New
3665 Me.eventRow = row
3666 Me.eventAction = action
3667 End Sub
3669 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3670 Public ReadOnly Property Row() As PersonRow
3672 Return Me.eventRow
3673 End Get
3674 End Property
3676 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3677 Public ReadOnly Property Action() As Global.System.Data.DataRowAction
3679 Return Me.eventAction
3680 End Get
3681 End Property
3682 End Class
3683 End Class
3685 Namespace SQLServer2005DBDataSetTableAdapters
3687 '''<summary>
3688 '''Represents the connection and commands used to retrieve and save data.
3689 '''</summary>
3690 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
3691 Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
3692 Global.System.ComponentModel.ToolboxItem(true), _
3693 Global.System.ComponentModel.DataObjectAttribute(true), _
3694 Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
3695 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
3696 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
3697 Partial Public Class CourseTableAdapter
3698 Inherits Global.System.ComponentModel.Component
3700 Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
3702 Private _connection As Global.System.Data.SqlClient.SqlConnection
3704 Private _transaction As Global.System.Data.SqlClient.SqlTransaction
3706 Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
3708 Private _clearBeforeFill As Boolean
3710 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3711 Public Sub New()
3712 MyBase.New
3713 Me.ClearBeforeFill = true
3714 End Sub
3716 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3717 Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
3719 If (Me._adapter Is Nothing) Then
3720 Me.InitAdapter
3721 End If
3722 Return Me._adapter
3723 End Get
3724 End Property
3726 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3727 Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
3729 If (Me._connection Is Nothing) Then
3730 Me.InitConnection
3731 End If
3732 Return Me._connection
3733 End Get
3735 Me._connection = value
3736 If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
3737 Me.Adapter.InsertCommand.Connection = value
3738 End If
3739 If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
3740 Me.Adapter.DeleteCommand.Connection = value
3741 End If
3742 If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
3743 Me.Adapter.UpdateCommand.Connection = value
3744 End If
3745 Dim i As Integer = 0
3746 Do While (i < Me.CommandCollection.Length)
3747 If (Not (Me.CommandCollection(i)) Is Nothing) Then
3748 CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
3749 End If
3750 i = (i + 1)
3751 Loop
3752 End Set
3753 End Property
3755 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3756 Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
3758 Return Me._transaction
3759 End Get
3761 Me._transaction = value
3762 Dim i As Integer = 0
3763 Do While (i < Me.CommandCollection.Length)
3764 Me.CommandCollection(i).Transaction = Me._transaction
3765 i = (i + 1)
3766 Loop
3767 If ((Not (Me.Adapter) Is Nothing) _
3768 AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
3769 Me.Adapter.DeleteCommand.Transaction = Me._transaction
3770 End If
3771 If ((Not (Me.Adapter) Is Nothing) _
3772 AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
3773 Me.Adapter.InsertCommand.Transaction = Me._transaction
3774 End If
3775 If ((Not (Me.Adapter) Is Nothing) _
3776 AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
3777 Me.Adapter.UpdateCommand.Transaction = Me._transaction
3778 End If
3779 End Set
3780 End Property
3782 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3783 Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
3785 If (Me._commandCollection Is Nothing) Then
3786 Me.InitCommandCollection
3787 End If
3788 Return Me._commandCollection
3789 End Get
3790 End Property
3792 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3793 Public Property ClearBeforeFill() As Boolean
3795 Return Me._clearBeforeFill
3796 End Get
3798 Me._clearBeforeFill = value
3799 End Set
3800 End Property
3802 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3803 Private Sub InitAdapter()
3804 Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
3805 Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
3806 tableMapping.SourceTable = "Table"
3807 tableMapping.DataSetTable = "Course"
3808 tableMapping.ColumnMappings.Add("CourseID", "CourseID")
3809 tableMapping.ColumnMappings.Add("Title", "Title")
3810 tableMapping.ColumnMappings.Add("Credits", "Credits")
3811 tableMapping.ColumnMappings.Add("DepartmentID", "DepartmentID")
3812 Me._adapter.TableMappings.Add(tableMapping)
3813 Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
3814 Me._adapter.DeleteCommand.Connection = Me.Connection
3815 Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Course] WHERE (([CourseID] = @Original_CourseID) AND ([Title] "& _
3816 "= @Original_Title) AND ([Credits] = @Original_Credits) AND ([DepartmentID] = @Or"& _
3817 "iginal_DepartmentID))"
3818 Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
3819 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
3820 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Title", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Title", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
3821 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Credits", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Credits", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
3822 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
3823 Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
3824 Me._adapter.InsertCommand.Connection = Me.Connection
3825 Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Course] ([CourseID], [Title], [Credits], [DepartmentID]) VALUE"& _
3826 "S (@CourseID, @Title, @Credits, @DepartmentID);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, Title, Credits"& _
3827 ", DepartmentID FROM Course WHERE (CourseID = @CourseID)"
3828 Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
3829 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
3830 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Title", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Title", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
3831 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Credits", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Credits", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
3832 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
3833 Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
3834 Me._adapter.UpdateCommand.Connection = Me.Connection
3835 Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Course] SET [CourseID] = @CourseID, [Title] = @Title, [Credits] = @"& _
3836 "Credits, [DepartmentID] = @DepartmentID WHERE (([CourseID] = @Original_CourseID)"& _
3837 " AND ([Title] = @Original_Title) AND ([Credits] = @Original_Credits) AND ([Depar"& _
3838 "tmentID] = @Original_DepartmentID));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, Title, Credits, Departmen"& _
3839 "tID FROM Course WHERE (CourseID = @CourseID)"
3840 Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
3841 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
3842 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Title", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Title", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
3843 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Credits", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Credits", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
3844 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
3845 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
3846 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Title", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Title", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
3847 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Credits", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Credits", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
3848 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
3849 End Sub
3851 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3852 Private Sub InitConnection()
3853 Me._connection = New Global.System.Data.SqlClient.SqlConnection
3854 Me._connection.ConnectionString = Global.VBUseADONET.My.MySettings.Default.SQLServer2005DBConnectionString
3855 End Sub
3857 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
3858 Private Sub InitCommandCollection()
3859 Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
3860 Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
3861 Me._commandCollection(0).Connection = Me.Connection
3862 Me._commandCollection(0).CommandText = "SELECT CourseID, Title, Credits, DepartmentID FROM dbo.Course"
3863 Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
3864 End Sub
3866 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3867 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
3868 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
3869 Public Overloads Overridable Function Fill(ByVal dataTable As SQLServer2005DBDataSet.CourseDataTable) As Integer
3870 Me.Adapter.SelectCommand = Me.CommandCollection(0)
3871 If (Me.ClearBeforeFill = true) Then
3872 dataTable.Clear
3873 End If
3874 Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
3875 Return returnValue
3876 End Function
3878 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3879 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
3880 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
3881 Public Overloads Overridable Function GetData() As SQLServer2005DBDataSet.CourseDataTable
3882 Me.Adapter.SelectCommand = Me.CommandCollection(0)
3883 Dim dataTable As SQLServer2005DBDataSet.CourseDataTable = New SQLServer2005DBDataSet.CourseDataTable
3884 Me.Adapter.Fill(dataTable)
3885 Return dataTable
3886 End Function
3888 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3889 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
3890 Public Overloads Overridable Function Update(ByVal dataTable As SQLServer2005DBDataSet.CourseDataTable) As Integer
3891 Return Me.Adapter.Update(dataTable)
3892 End Function
3894 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3895 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
3896 Public Overloads Overridable Function Update(ByVal dataSet As SQLServer2005DBDataSet) As Integer
3897 Return Me.Adapter.Update(dataSet, "Course")
3898 End Function
3900 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3901 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
3902 Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
3903 Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
3904 End Function
3906 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3907 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
3908 Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
3909 Return Me.Adapter.Update(dataRows)
3910 End Function
3912 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3913 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
3914 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
3915 Public Overloads Overridable Function Delete(ByVal Original_CourseID As Integer, ByVal Original_Title As String, ByVal Original_Credits As Integer, ByVal Original_DepartmentID As Integer) As Integer
3916 Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_CourseID,Integer)
3917 If (Original_Title Is Nothing) Then
3918 Throw New Global.System.ArgumentNullException("Original_Title")
3919 Else
3920 Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_Title,String)
3921 End If
3922 Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_Credits,Integer)
3923 Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_DepartmentID,Integer)
3924 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
3925 If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
3926 <> Global.System.Data.ConnectionState.Open) Then
3927 Me.Adapter.DeleteCommand.Connection.Open
3928 End If
3929 Try
3930 Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
3931 Return returnValue
3932 Finally
3933 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
3934 Me.Adapter.DeleteCommand.Connection.Close
3935 End If
3936 End Try
3937 End Function
3939 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3940 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
3941 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
3942 Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal Title As String, ByVal Credits As Integer, ByVal DepartmentID As Integer) As Integer
3943 Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
3944 If (Title Is Nothing) Then
3945 Throw New Global.System.ArgumentNullException("Title")
3946 Else
3947 Me.Adapter.InsertCommand.Parameters(1).Value = CType(Title,String)
3948 End If
3949 Me.Adapter.InsertCommand.Parameters(2).Value = CType(Credits,Integer)
3950 Me.Adapter.InsertCommand.Parameters(3).Value = CType(DepartmentID,Integer)
3951 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
3952 If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
3953 <> Global.System.Data.ConnectionState.Open) Then
3954 Me.Adapter.InsertCommand.Connection.Open
3955 End If
3956 Try
3957 Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
3958 Return returnValue
3959 Finally
3960 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
3961 Me.Adapter.InsertCommand.Connection.Close
3962 End If
3963 End Try
3964 End Function
3966 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
3967 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
3968 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
3969 Public Overloads Overridable Function Update(ByVal CourseID As Integer, ByVal Title As String, ByVal Credits As Integer, ByVal DepartmentID As Integer, ByVal Original_CourseID As Integer, ByVal Original_Title As String, ByVal Original_Credits As Integer, ByVal Original_DepartmentID As Integer) As Integer
3970 Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
3971 If (Title Is Nothing) Then
3972 Throw New Global.System.ArgumentNullException("Title")
3973 Else
3974 Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Title,String)
3975 End If
3976 Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Credits,Integer)
3977 Me.Adapter.UpdateCommand.Parameters(3).Value = CType(DepartmentID,Integer)
3978 Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_CourseID,Integer)
3979 If (Original_Title Is Nothing) Then
3980 Throw New Global.System.ArgumentNullException("Original_Title")
3981 Else
3982 Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_Title,String)
3983 End If
3984 Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_Credits,Integer)
3985 Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_DepartmentID,Integer)
3986 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
3987 If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
3988 <> Global.System.Data.ConnectionState.Open) Then
3989 Me.Adapter.UpdateCommand.Connection.Open
3990 End If
3991 Try
3992 Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
3993 Return returnValue
3994 Finally
3995 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
3996 Me.Adapter.UpdateCommand.Connection.Close
3997 End If
3998 End Try
3999 End Function
4001 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4002 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4003 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
4004 Public Overloads Overridable Function Update(ByVal Title As String, ByVal Credits As Integer, ByVal DepartmentID As Integer, ByVal Original_CourseID As Integer, ByVal Original_Title As String, ByVal Original_Credits As Integer, ByVal Original_DepartmentID As Integer) As Integer
4005 Return Me.Update(Original_CourseID, Title, Credits, DepartmentID, Original_CourseID, Original_Title, Original_Credits, Original_DepartmentID)
4006 End Function
4007 End Class
4009 '''<summary>
4010 '''Represents the connection and commands used to retrieve and save data.
4011 '''</summary>
4012 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
4013 Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
4014 Global.System.ComponentModel.ToolboxItem(true), _
4015 Global.System.ComponentModel.DataObjectAttribute(true), _
4016 Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
4017 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
4018 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4019 Partial Public Class CourseGradeTableAdapter
4020 Inherits Global.System.ComponentModel.Component
4022 Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
4024 Private _connection As Global.System.Data.SqlClient.SqlConnection
4026 Private _transaction As Global.System.Data.SqlClient.SqlTransaction
4028 Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
4030 Private _clearBeforeFill As Boolean
4032 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4033 Public Sub New()
4034 MyBase.New
4035 Me.ClearBeforeFill = true
4036 End Sub
4038 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4039 Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
4041 If (Me._adapter Is Nothing) Then
4042 Me.InitAdapter
4043 End If
4044 Return Me._adapter
4045 End Get
4046 End Property
4048 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4049 Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
4051 If (Me._connection Is Nothing) Then
4052 Me.InitConnection
4053 End If
4054 Return Me._connection
4055 End Get
4057 Me._connection = value
4058 If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
4059 Me.Adapter.InsertCommand.Connection = value
4060 End If
4061 If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
4062 Me.Adapter.DeleteCommand.Connection = value
4063 End If
4064 If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
4065 Me.Adapter.UpdateCommand.Connection = value
4066 End If
4067 Dim i As Integer = 0
4068 Do While (i < Me.CommandCollection.Length)
4069 If (Not (Me.CommandCollection(i)) Is Nothing) Then
4070 CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
4071 End If
4072 i = (i + 1)
4073 Loop
4074 End Set
4075 End Property
4077 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4078 Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
4080 Return Me._transaction
4081 End Get
4083 Me._transaction = value
4084 Dim i As Integer = 0
4085 Do While (i < Me.CommandCollection.Length)
4086 Me.CommandCollection(i).Transaction = Me._transaction
4087 i = (i + 1)
4088 Loop
4089 If ((Not (Me.Adapter) Is Nothing) _
4090 AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
4091 Me.Adapter.DeleteCommand.Transaction = Me._transaction
4092 End If
4093 If ((Not (Me.Adapter) Is Nothing) _
4094 AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
4095 Me.Adapter.InsertCommand.Transaction = Me._transaction
4096 End If
4097 If ((Not (Me.Adapter) Is Nothing) _
4098 AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
4099 Me.Adapter.UpdateCommand.Transaction = Me._transaction
4100 End If
4101 End Set
4102 End Property
4104 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4105 Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
4107 If (Me._commandCollection Is Nothing) Then
4108 Me.InitCommandCollection
4109 End If
4110 Return Me._commandCollection
4111 End Get
4112 End Property
4114 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4115 Public Property ClearBeforeFill() As Boolean
4117 Return Me._clearBeforeFill
4118 End Get
4120 Me._clearBeforeFill = value
4121 End Set
4122 End Property
4124 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4125 Private Sub InitAdapter()
4126 Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
4127 Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
4128 tableMapping.SourceTable = "Table"
4129 tableMapping.DataSetTable = "CourseGrade"
4130 tableMapping.ColumnMappings.Add("EnrollmentID", "EnrollmentID")
4131 tableMapping.ColumnMappings.Add("CourseID", "CourseID")
4132 tableMapping.ColumnMappings.Add("StudentID", "StudentID")
4133 tableMapping.ColumnMappings.Add("Grade", "Grade")
4134 Me._adapter.TableMappings.Add(tableMapping)
4135 Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
4136 Me._adapter.DeleteCommand.Connection = Me.Connection
4137 Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[CourseGrade] WHERE (([EnrollmentID] = @Original_EnrollmentID) "& _
4138 "AND ([CourseID] = @Original_CourseID) AND ([StudentID] = @Original_StudentID) AN"& _
4139 "D ((@IsNull_Grade = 1 AND [Grade] IS NULL) OR ([Grade] = @Original_Grade)))"
4140 Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
4141 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_EnrollmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4142 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4143 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_StudentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StudentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4144 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_Grade", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Grade", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
4145 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Grade", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 2, "Grade", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4146 Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
4147 Me._adapter.InsertCommand.Connection = Me.Connection
4148 Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[CourseGrade] ([CourseID], [StudentID], [Grade]) VALUES (@Cours"& _
4149 "eID, @StudentID, @Grade);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT EnrollmentID, CourseID, StudentID, Grade FROM "& _
4150 "CourseGrade WHERE (EnrollmentID = SCOPE_IDENTITY())"
4151 Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
4152 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4153 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@StudentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StudentID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4154 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Grade", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 2, "Grade", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4155 Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
4156 Me._adapter.UpdateCommand.Connection = Me.Connection
4157 Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[CourseGrade] SET [CourseID] = @CourseID, [StudentID] = @StudentID, "& _
4158 "[Grade] = @Grade WHERE (([EnrollmentID] = @Original_EnrollmentID) AND ([CourseID"& _
4159 "] = @Original_CourseID) AND ([StudentID] = @Original_StudentID) AND ((@IsNull_Gr"& _
4160 "ade = 1 AND [Grade] IS NULL) OR ([Grade] = @Original_Grade)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT Enrollmen"& _
4161 "tID, CourseID, StudentID, Grade FROM CourseGrade WHERE (EnrollmentID = @Enrollme"& _
4162 "ntID)"
4163 Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
4164 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4165 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@StudentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StudentID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4166 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Grade", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 2, "Grade", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4167 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_EnrollmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4168 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4169 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_StudentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StudentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4170 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_Grade", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Grade", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
4171 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Grade", Global.System.Data.SqlDbType.[Decimal], 0, Global.System.Data.ParameterDirection.Input, 3, 2, "Grade", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4172 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EnrollmentID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4173 End Sub
4175 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4176 Private Sub InitConnection()
4177 Me._connection = New Global.System.Data.SqlClient.SqlConnection
4178 Me._connection.ConnectionString = Global.VBUseADONET.My.MySettings.Default.SQLServer2005DBConnectionString
4179 End Sub
4181 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4182 Private Sub InitCommandCollection()
4183 Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
4184 Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
4185 Me._commandCollection(0).Connection = Me.Connection
4186 Me._commandCollection(0).CommandText = "SELECT EnrollmentID, CourseID, StudentID, Grade FROM dbo.CourseGrade"
4187 Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
4188 End Sub
4190 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4191 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4192 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
4193 Public Overloads Overridable Function Fill(ByVal dataTable As SQLServer2005DBDataSet.CourseGradeDataTable) As Integer
4194 Me.Adapter.SelectCommand = Me.CommandCollection(0)
4195 If (Me.ClearBeforeFill = true) Then
4196 dataTable.Clear
4197 End If
4198 Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
4199 Return returnValue
4200 End Function
4202 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4203 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4204 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
4205 Public Overloads Overridable Function GetData() As SQLServer2005DBDataSet.CourseGradeDataTable
4206 Me.Adapter.SelectCommand = Me.CommandCollection(0)
4207 Dim dataTable As SQLServer2005DBDataSet.CourseGradeDataTable = New SQLServer2005DBDataSet.CourseGradeDataTable
4208 Me.Adapter.Fill(dataTable)
4209 Return dataTable
4210 End Function
4212 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4213 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4214 Public Overloads Overridable Function Update(ByVal dataTable As SQLServer2005DBDataSet.CourseGradeDataTable) As Integer
4215 Return Me.Adapter.Update(dataTable)
4216 End Function
4218 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4219 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4220 Public Overloads Overridable Function Update(ByVal dataSet As SQLServer2005DBDataSet) As Integer
4221 Return Me.Adapter.Update(dataSet, "CourseGrade")
4222 End Function
4224 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4225 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4226 Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
4227 Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
4228 End Function
4230 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4231 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4232 Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
4233 Return Me.Adapter.Update(dataRows)
4234 End Function
4236 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4237 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4238 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
4239 Public Overloads Overridable Function Delete(ByVal Original_EnrollmentID As Integer, ByVal Original_CourseID As Integer, ByVal Original_StudentID As Integer, ByVal Original_Grade As Global.System.Nullable(Of Decimal)) As Integer
4240 Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_EnrollmentID,Integer)
4241 Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_CourseID,Integer)
4242 Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_StudentID,Integer)
4243 If (Original_Grade.HasValue = true) Then
4244 Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object)
4245 Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_Grade.Value,Decimal)
4246 Else
4247 Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object)
4248 Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value
4249 End If
4250 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
4251 If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
4252 <> Global.System.Data.ConnectionState.Open) Then
4253 Me.Adapter.DeleteCommand.Connection.Open
4254 End If
4255 Try
4256 Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
4257 Return returnValue
4258 Finally
4259 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
4260 Me.Adapter.DeleteCommand.Connection.Close
4261 End If
4262 End Try
4263 End Function
4265 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4266 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4267 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
4268 Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal StudentID As Integer, ByVal Grade As Global.System.Nullable(Of Decimal)) As Integer
4269 Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
4270 Me.Adapter.InsertCommand.Parameters(1).Value = CType(StudentID,Integer)
4271 If (Grade.HasValue = true) Then
4272 Me.Adapter.InsertCommand.Parameters(2).Value = CType(Grade.Value,Decimal)
4273 Else
4274 Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value
4275 End If
4276 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
4277 If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
4278 <> Global.System.Data.ConnectionState.Open) Then
4279 Me.Adapter.InsertCommand.Connection.Open
4280 End If
4281 Try
4282 Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
4283 Return returnValue
4284 Finally
4285 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
4286 Me.Adapter.InsertCommand.Connection.Close
4287 End If
4288 End Try
4289 End Function
4291 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4292 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4293 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
4294 Public Overloads Overridable Function Update(ByVal CourseID As Integer, ByVal StudentID As Integer, ByVal Grade As Global.System.Nullable(Of Decimal), ByVal Original_EnrollmentID As Integer, ByVal Original_CourseID As Integer, ByVal Original_StudentID As Integer, ByVal Original_Grade As Global.System.Nullable(Of Decimal), ByVal EnrollmentID As Integer) As Integer
4295 Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
4296 Me.Adapter.UpdateCommand.Parameters(1).Value = CType(StudentID,Integer)
4297 If (Grade.HasValue = true) Then
4298 Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Grade.Value,Decimal)
4299 Else
4300 Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value
4301 End If
4302 Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_EnrollmentID,Integer)
4303 Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_CourseID,Integer)
4304 Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_StudentID,Integer)
4305 If (Original_Grade.HasValue = true) Then
4306 Me.Adapter.UpdateCommand.Parameters(6).Value = CType(0,Object)
4307 Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_Grade.Value,Decimal)
4308 Else
4309 Me.Adapter.UpdateCommand.Parameters(6).Value = CType(1,Object)
4310 Me.Adapter.UpdateCommand.Parameters(7).Value = Global.System.DBNull.Value
4311 End If
4312 Me.Adapter.UpdateCommand.Parameters(8).Value = CType(EnrollmentID,Integer)
4313 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
4314 If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
4315 <> Global.System.Data.ConnectionState.Open) Then
4316 Me.Adapter.UpdateCommand.Connection.Open
4317 End If
4318 Try
4319 Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
4320 Return returnValue
4321 Finally
4322 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
4323 Me.Adapter.UpdateCommand.Connection.Close
4324 End If
4325 End Try
4326 End Function
4328 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4329 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4330 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
4331 Public Overloads Overridable Function Update(ByVal CourseID As Integer, ByVal StudentID As Integer, ByVal Grade As Global.System.Nullable(Of Decimal), ByVal Original_EnrollmentID As Integer, ByVal Original_CourseID As Integer, ByVal Original_StudentID As Integer, ByVal Original_Grade As Global.System.Nullable(Of Decimal)) As Integer
4332 Return Me.Update(CourseID, StudentID, Grade, Original_EnrollmentID, Original_CourseID, Original_StudentID, Original_Grade, Original_EnrollmentID)
4333 End Function
4334 End Class
4336 '''<summary>
4337 '''Represents the connection and commands used to retrieve and save data.
4338 '''</summary>
4339 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
4340 Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
4341 Global.System.ComponentModel.ToolboxItem(true), _
4342 Global.System.ComponentModel.DataObjectAttribute(true), _
4343 Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
4344 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
4345 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4346 Partial Public Class CourseInstructorTableAdapter
4347 Inherits Global.System.ComponentModel.Component
4349 Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
4351 Private _connection As Global.System.Data.SqlClient.SqlConnection
4353 Private _transaction As Global.System.Data.SqlClient.SqlTransaction
4355 Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
4357 Private _clearBeforeFill As Boolean
4359 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4360 Public Sub New()
4361 MyBase.New
4362 Me.ClearBeforeFill = true
4363 End Sub
4365 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4366 Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
4368 If (Me._adapter Is Nothing) Then
4369 Me.InitAdapter
4370 End If
4371 Return Me._adapter
4372 End Get
4373 End Property
4375 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4376 Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
4378 If (Me._connection Is Nothing) Then
4379 Me.InitConnection
4380 End If
4381 Return Me._connection
4382 End Get
4384 Me._connection = value
4385 If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
4386 Me.Adapter.InsertCommand.Connection = value
4387 End If
4388 If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
4389 Me.Adapter.DeleteCommand.Connection = value
4390 End If
4391 If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
4392 Me.Adapter.UpdateCommand.Connection = value
4393 End If
4394 Dim i As Integer = 0
4395 Do While (i < Me.CommandCollection.Length)
4396 If (Not (Me.CommandCollection(i)) Is Nothing) Then
4397 CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
4398 End If
4399 i = (i + 1)
4400 Loop
4401 End Set
4402 End Property
4404 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4405 Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
4407 Return Me._transaction
4408 End Get
4410 Me._transaction = value
4411 Dim i As Integer = 0
4412 Do While (i < Me.CommandCollection.Length)
4413 Me.CommandCollection(i).Transaction = Me._transaction
4414 i = (i + 1)
4415 Loop
4416 If ((Not (Me.Adapter) Is Nothing) _
4417 AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
4418 Me.Adapter.DeleteCommand.Transaction = Me._transaction
4419 End If
4420 If ((Not (Me.Adapter) Is Nothing) _
4421 AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
4422 Me.Adapter.InsertCommand.Transaction = Me._transaction
4423 End If
4424 If ((Not (Me.Adapter) Is Nothing) _
4425 AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
4426 Me.Adapter.UpdateCommand.Transaction = Me._transaction
4427 End If
4428 End Set
4429 End Property
4431 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4432 Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
4434 If (Me._commandCollection Is Nothing) Then
4435 Me.InitCommandCollection
4436 End If
4437 Return Me._commandCollection
4438 End Get
4439 End Property
4441 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4442 Public Property ClearBeforeFill() As Boolean
4444 Return Me._clearBeforeFill
4445 End Get
4447 Me._clearBeforeFill = value
4448 End Set
4449 End Property
4451 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4452 Private Sub InitAdapter()
4453 Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
4454 Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
4455 tableMapping.SourceTable = "Table"
4456 tableMapping.DataSetTable = "CourseInstructor"
4457 tableMapping.ColumnMappings.Add("CourseID", "CourseID")
4458 tableMapping.ColumnMappings.Add("PersonID", "PersonID")
4459 Me._adapter.TableMappings.Add(tableMapping)
4460 Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
4461 Me._adapter.DeleteCommand.Connection = Me.Connection
4462 Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[CourseInstructor] WHERE (([CourseID] = @Original_CourseID) AND"& _
4463 " ([PersonID] = @Original_PersonID))"
4464 Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
4465 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4466 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_PersonID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4467 Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
4468 Me._adapter.InsertCommand.Connection = Me.Connection
4469 Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[CourseInstructor] ([CourseID], [PersonID]) VALUES (@CourseID, "& _
4470 "@PersonID);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, PersonID FROM CourseInstructor WHERE (CourseID = @"& _
4471 "CourseID) AND (PersonID = @PersonID)"
4472 Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
4473 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4474 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PersonID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4475 Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
4476 Me._adapter.UpdateCommand.Connection = Me.Connection
4477 Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[CourseInstructor] SET [CourseID] = @CourseID, [PersonID] = @PersonI"& _
4478 "D WHERE (([CourseID] = @Original_CourseID) AND ([PersonID] = @Original_PersonID)"& _
4479 ");"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, PersonID FROM CourseInstructor WHERE (CourseID = @CourseID)"& _
4480 " AND (PersonID = @PersonID)"
4481 Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
4482 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4483 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PersonID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4484 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4485 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_PersonID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4486 End Sub
4488 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4489 Private Sub InitConnection()
4490 Me._connection = New Global.System.Data.SqlClient.SqlConnection
4491 Me._connection.ConnectionString = Global.VBUseADONET.My.MySettings.Default.SQLServer2005DBConnectionString
4492 End Sub
4494 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4495 Private Sub InitCommandCollection()
4496 Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
4497 Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
4498 Me._commandCollection(0).Connection = Me.Connection
4499 Me._commandCollection(0).CommandText = "SELECT CourseID, PersonID FROM dbo.CourseInstructor"
4500 Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
4501 End Sub
4503 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4504 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4505 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
4506 Public Overloads Overridable Function Fill(ByVal dataTable As SQLServer2005DBDataSet.CourseInstructorDataTable) As Integer
4507 Me.Adapter.SelectCommand = Me.CommandCollection(0)
4508 If (Me.ClearBeforeFill = true) Then
4509 dataTable.Clear
4510 End If
4511 Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
4512 Return returnValue
4513 End Function
4515 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4516 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4517 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
4518 Public Overloads Overridable Function GetData() As SQLServer2005DBDataSet.CourseInstructorDataTable
4519 Me.Adapter.SelectCommand = Me.CommandCollection(0)
4520 Dim dataTable As SQLServer2005DBDataSet.CourseInstructorDataTable = New SQLServer2005DBDataSet.CourseInstructorDataTable
4521 Me.Adapter.Fill(dataTable)
4522 Return dataTable
4523 End Function
4525 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4526 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4527 Public Overloads Overridable Function Update(ByVal dataTable As SQLServer2005DBDataSet.CourseInstructorDataTable) As Integer
4528 Return Me.Adapter.Update(dataTable)
4529 End Function
4531 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4532 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4533 Public Overloads Overridable Function Update(ByVal dataSet As SQLServer2005DBDataSet) As Integer
4534 Return Me.Adapter.Update(dataSet, "CourseInstructor")
4535 End Function
4537 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4538 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4539 Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
4540 Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
4541 End Function
4543 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4544 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4545 Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
4546 Return Me.Adapter.Update(dataRows)
4547 End Function
4549 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4550 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4551 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
4552 Public Overloads Overridable Function Delete(ByVal Original_CourseID As Integer, ByVal Original_PersonID As Integer) As Integer
4553 Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_CourseID,Integer)
4554 Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_PersonID,Integer)
4555 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
4556 If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
4557 <> Global.System.Data.ConnectionState.Open) Then
4558 Me.Adapter.DeleteCommand.Connection.Open
4559 End If
4560 Try
4561 Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
4562 Return returnValue
4563 Finally
4564 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
4565 Me.Adapter.DeleteCommand.Connection.Close
4566 End If
4567 End Try
4568 End Function
4570 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4571 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4572 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
4573 Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal PersonID As Integer) As Integer
4574 Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
4575 Me.Adapter.InsertCommand.Parameters(1).Value = CType(PersonID,Integer)
4576 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
4577 If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
4578 <> Global.System.Data.ConnectionState.Open) Then
4579 Me.Adapter.InsertCommand.Connection.Open
4580 End If
4581 Try
4582 Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
4583 Return returnValue
4584 Finally
4585 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
4586 Me.Adapter.InsertCommand.Connection.Close
4587 End If
4588 End Try
4589 End Function
4591 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4592 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4593 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
4594 Public Overloads Overridable Function Update(ByVal CourseID As Integer, ByVal PersonID As Integer, ByVal Original_CourseID As Integer, ByVal Original_PersonID As Integer) As Integer
4595 Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
4596 Me.Adapter.UpdateCommand.Parameters(1).Value = CType(PersonID,Integer)
4597 Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Original_CourseID,Integer)
4598 Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_PersonID,Integer)
4599 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
4600 If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
4601 <> Global.System.Data.ConnectionState.Open) Then
4602 Me.Adapter.UpdateCommand.Connection.Open
4603 End If
4604 Try
4605 Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
4606 Return returnValue
4607 Finally
4608 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
4609 Me.Adapter.UpdateCommand.Connection.Close
4610 End If
4611 End Try
4612 End Function
4614 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4615 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4616 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
4617 Public Overloads Overridable Function Update(ByVal Original_CourseID As Integer, ByVal Original_PersonID As Integer) As Integer
4618 Return Me.Update(Original_CourseID, Original_PersonID, Original_CourseID, Original_PersonID)
4619 End Function
4620 End Class
4622 '''<summary>
4623 '''Represents the connection and commands used to retrieve and save data.
4624 '''</summary>
4625 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
4626 Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
4627 Global.System.ComponentModel.ToolboxItem(true), _
4628 Global.System.ComponentModel.DataObjectAttribute(true), _
4629 Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
4630 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
4631 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4632 Partial Public Class DepartmentTableAdapter
4633 Inherits Global.System.ComponentModel.Component
4635 Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
4637 Private _connection As Global.System.Data.SqlClient.SqlConnection
4639 Private _transaction As Global.System.Data.SqlClient.SqlTransaction
4641 Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
4643 Private _clearBeforeFill As Boolean
4645 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4646 Public Sub New()
4647 MyBase.New
4648 Me.ClearBeforeFill = true
4649 End Sub
4651 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4652 Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
4654 If (Me._adapter Is Nothing) Then
4655 Me.InitAdapter
4656 End If
4657 Return Me._adapter
4658 End Get
4659 End Property
4661 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4662 Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
4664 If (Me._connection Is Nothing) Then
4665 Me.InitConnection
4666 End If
4667 Return Me._connection
4668 End Get
4670 Me._connection = value
4671 If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
4672 Me.Adapter.InsertCommand.Connection = value
4673 End If
4674 If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
4675 Me.Adapter.DeleteCommand.Connection = value
4676 End If
4677 If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
4678 Me.Adapter.UpdateCommand.Connection = value
4679 End If
4680 Dim i As Integer = 0
4681 Do While (i < Me.CommandCollection.Length)
4682 If (Not (Me.CommandCollection(i)) Is Nothing) Then
4683 CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
4684 End If
4685 i = (i + 1)
4686 Loop
4687 End Set
4688 End Property
4690 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4691 Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
4693 Return Me._transaction
4694 End Get
4696 Me._transaction = value
4697 Dim i As Integer = 0
4698 Do While (i < Me.CommandCollection.Length)
4699 Me.CommandCollection(i).Transaction = Me._transaction
4700 i = (i + 1)
4701 Loop
4702 If ((Not (Me.Adapter) Is Nothing) _
4703 AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
4704 Me.Adapter.DeleteCommand.Transaction = Me._transaction
4705 End If
4706 If ((Not (Me.Adapter) Is Nothing) _
4707 AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
4708 Me.Adapter.InsertCommand.Transaction = Me._transaction
4709 End If
4710 If ((Not (Me.Adapter) Is Nothing) _
4711 AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
4712 Me.Adapter.UpdateCommand.Transaction = Me._transaction
4713 End If
4714 End Set
4715 End Property
4717 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4718 Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
4720 If (Me._commandCollection Is Nothing) Then
4721 Me.InitCommandCollection
4722 End If
4723 Return Me._commandCollection
4724 End Get
4725 End Property
4727 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4728 Public Property ClearBeforeFill() As Boolean
4730 Return Me._clearBeforeFill
4731 End Get
4733 Me._clearBeforeFill = value
4734 End Set
4735 End Property
4737 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4738 Private Sub InitAdapter()
4739 Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
4740 Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
4741 tableMapping.SourceTable = "Table"
4742 tableMapping.DataSetTable = "Department"
4743 tableMapping.ColumnMappings.Add("DepartmentID", "DepartmentID")
4744 tableMapping.ColumnMappings.Add("Name", "Name")
4745 tableMapping.ColumnMappings.Add("Budget", "Budget")
4746 tableMapping.ColumnMappings.Add("StartDate", "StartDate")
4747 tableMapping.ColumnMappings.Add("Administrator", "Administrator")
4748 Me._adapter.TableMappings.Add(tableMapping)
4749 Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
4750 Me._adapter.DeleteCommand.Connection = Me.Connection
4751 Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Department] WHERE (([DepartmentID] = @Original_DepartmentID) A"& _
4752 "ND ([Name] = @Original_Name) AND ([Budget] = @Original_Budget) AND ([StartDate] "& _
4753 "= @Original_StartDate) AND ((@IsNull_Administrator = 1 AND [Administrator] IS NU"& _
4754 "LL) OR ([Administrator] = @Original_Administrator)))"
4755 Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
4756 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4757 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Name", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Name", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4758 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Budget", Global.System.Data.SqlDbType.Money, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Budget", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4759 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_StartDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StartDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4760 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_Administrator", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Administrator", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
4761 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Administrator", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Administrator", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4762 Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
4763 Me._adapter.InsertCommand.Connection = Me.Connection
4764 Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Department] ([DepartmentID], [Name], [Budget], [StartDate], [A"& _
4765 "dministrator]) VALUES (@DepartmentID, @Name, @Budget, @StartDate, @Administrator"& _
4766 ");"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT DepartmentID, Name, Budget, StartDate, Administrator FROM Department "& _
4767 "WHERE (DepartmentID = @DepartmentID)"
4768 Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
4769 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4770 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Name", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Name", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4771 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Budget", Global.System.Data.SqlDbType.Money, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Budget", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4772 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@StartDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StartDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4773 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Administrator", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Administrator", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4774 Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
4775 Me._adapter.UpdateCommand.Connection = Me.Connection
4776 Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Department] SET [DepartmentID] = @DepartmentID, [Name] = @Name, [Bu"& _
4777 "dget] = @Budget, [StartDate] = @StartDate, [Administrator] = @Administrator WHER"& _
4778 "E (([DepartmentID] = @Original_DepartmentID) AND ([Name] = @Original_Name) AND ("& _
4779 "[Budget] = @Original_Budget) AND ([StartDate] = @Original_StartDate) AND ((@IsNu"& _
4780 "ll_Administrator = 1 AND [Administrator] IS NULL) OR ([Administrator] = @Origina"& _
4781 "l_Administrator)));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT DepartmentID, Name, Budget, StartDate, Administrator"& _
4782 " FROM Department WHERE (DepartmentID = @DepartmentID)"
4783 Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
4784 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4785 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Name", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Name", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4786 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Budget", Global.System.Data.SqlDbType.Money, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Budget", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4787 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@StartDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StartDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4788 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Administrator", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Administrator", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
4789 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_DepartmentID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "DepartmentID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4790 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Name", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Name", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4791 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Budget", Global.System.Data.SqlDbType.Money, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Budget", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4792 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_StartDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "StartDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4793 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_Administrator", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Administrator", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
4794 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Administrator", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Administrator", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
4795 End Sub
4797 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4798 Private Sub InitConnection()
4799 Me._connection = New Global.System.Data.SqlClient.SqlConnection
4800 Me._connection.ConnectionString = Global.VBUseADONET.My.MySettings.Default.SQLServer2005DBConnectionString
4801 End Sub
4803 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
4804 Private Sub InitCommandCollection()
4805 Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
4806 Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
4807 Me._commandCollection(0).Connection = Me.Connection
4808 Me._commandCollection(0).CommandText = "SELECT DepartmentID, Name, Budget, StartDate, Administrator FROM dbo.Department"
4809 Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
4810 End Sub
4812 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4813 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4814 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
4815 Public Overloads Overridable Function Fill(ByVal dataTable As SQLServer2005DBDataSet.DepartmentDataTable) As Integer
4816 Me.Adapter.SelectCommand = Me.CommandCollection(0)
4817 If (Me.ClearBeforeFill = true) Then
4818 dataTable.Clear
4819 End If
4820 Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
4821 Return returnValue
4822 End Function
4824 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4825 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4826 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
4827 Public Overloads Overridable Function GetData() As SQLServer2005DBDataSet.DepartmentDataTable
4828 Me.Adapter.SelectCommand = Me.CommandCollection(0)
4829 Dim dataTable As SQLServer2005DBDataSet.DepartmentDataTable = New SQLServer2005DBDataSet.DepartmentDataTable
4830 Me.Adapter.Fill(dataTable)
4831 Return dataTable
4832 End Function
4834 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4835 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4836 Public Overloads Overridable Function Update(ByVal dataTable As SQLServer2005DBDataSet.DepartmentDataTable) As Integer
4837 Return Me.Adapter.Update(dataTable)
4838 End Function
4840 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4841 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4842 Public Overloads Overridable Function Update(ByVal dataSet As SQLServer2005DBDataSet) As Integer
4843 Return Me.Adapter.Update(dataSet, "Department")
4844 End Function
4846 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4847 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4848 Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
4849 Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
4850 End Function
4852 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4853 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4854 Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
4855 Return Me.Adapter.Update(dataRows)
4856 End Function
4858 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4859 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4860 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
4861 Public Overloads Overridable Function Delete(ByVal Original_DepartmentID As Integer, ByVal Original_Name As String, ByVal Original_Budget As Decimal, ByVal Original_StartDate As Date, ByVal Original_Administrator As Global.System.Nullable(Of Integer)) As Integer
4862 Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_DepartmentID,Integer)
4863 If (Original_Name Is Nothing) Then
4864 Throw New Global.System.ArgumentNullException("Original_Name")
4865 Else
4866 Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_Name,String)
4867 End If
4868 Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_Budget,Decimal)
4869 Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_StartDate,Date)
4870 If (Original_Administrator.HasValue = true) Then
4871 Me.Adapter.DeleteCommand.Parameters(4).Value = CType(0,Object)
4872 Me.Adapter.DeleteCommand.Parameters(5).Value = CType(Original_Administrator.Value,Integer)
4873 Else
4874 Me.Adapter.DeleteCommand.Parameters(4).Value = CType(1,Object)
4875 Me.Adapter.DeleteCommand.Parameters(5).Value = Global.System.DBNull.Value
4876 End If
4877 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
4878 If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
4879 <> Global.System.Data.ConnectionState.Open) Then
4880 Me.Adapter.DeleteCommand.Connection.Open
4881 End If
4882 Try
4883 Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
4884 Return returnValue
4885 Finally
4886 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
4887 Me.Adapter.DeleteCommand.Connection.Close
4888 End If
4889 End Try
4890 End Function
4892 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4893 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4894 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
4895 Public Overloads Overridable Function Insert(ByVal DepartmentID As Integer, ByVal Name As String, ByVal Budget As Decimal, ByVal StartDate As Date, ByVal Administrator As Global.System.Nullable(Of Integer)) As Integer
4896 Me.Adapter.InsertCommand.Parameters(0).Value = CType(DepartmentID,Integer)
4897 If (Name Is Nothing) Then
4898 Throw New Global.System.ArgumentNullException("Name")
4899 Else
4900 Me.Adapter.InsertCommand.Parameters(1).Value = CType(Name,String)
4901 End If
4902 Me.Adapter.InsertCommand.Parameters(2).Value = CType(Budget,Decimal)
4903 Me.Adapter.InsertCommand.Parameters(3).Value = CType(StartDate,Date)
4904 If (Administrator.HasValue = true) Then
4905 Me.Adapter.InsertCommand.Parameters(4).Value = CType(Administrator.Value,Integer)
4906 Else
4907 Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value
4908 End If
4909 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
4910 If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
4911 <> Global.System.Data.ConnectionState.Open) Then
4912 Me.Adapter.InsertCommand.Connection.Open
4913 End If
4914 Try
4915 Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
4916 Return returnValue
4917 Finally
4918 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
4919 Me.Adapter.InsertCommand.Connection.Close
4920 End If
4921 End Try
4922 End Function
4924 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4925 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4926 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
4927 Public Overloads Overridable Function Update(ByVal DepartmentID As Integer, ByVal Name As String, ByVal Budget As Decimal, ByVal StartDate As Date, ByVal Administrator As Global.System.Nullable(Of Integer), ByVal Original_DepartmentID As Integer, ByVal Original_Name As String, ByVal Original_Budget As Decimal, ByVal Original_StartDate As Date, ByVal Original_Administrator As Global.System.Nullable(Of Integer)) As Integer
4928 Me.Adapter.UpdateCommand.Parameters(0).Value = CType(DepartmentID,Integer)
4929 If (Name Is Nothing) Then
4930 Throw New Global.System.ArgumentNullException("Name")
4931 Else
4932 Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Name,String)
4933 End If
4934 Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Budget,Decimal)
4935 Me.Adapter.UpdateCommand.Parameters(3).Value = CType(StartDate,Date)
4936 If (Administrator.HasValue = true) Then
4937 Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Administrator.Value,Integer)
4938 Else
4939 Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value
4940 End If
4941 Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_DepartmentID,Integer)
4942 If (Original_Name Is Nothing) Then
4943 Throw New Global.System.ArgumentNullException("Original_Name")
4944 Else
4945 Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_Name,String)
4946 End If
4947 Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_Budget,Decimal)
4948 Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_StartDate,Date)
4949 If (Original_Administrator.HasValue = true) Then
4950 Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object)
4951 Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_Administrator.Value,Integer)
4952 Else
4953 Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object)
4954 Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value
4955 End If
4956 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
4957 If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
4958 <> Global.System.Data.ConnectionState.Open) Then
4959 Me.Adapter.UpdateCommand.Connection.Open
4960 End If
4961 Try
4962 Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
4963 Return returnValue
4964 Finally
4965 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
4966 Me.Adapter.UpdateCommand.Connection.Close
4967 End If
4968 End Try
4969 End Function
4971 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
4972 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
4973 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
4974 Public Overloads Overridable Function Update(ByVal Name As String, ByVal Budget As Decimal, ByVal StartDate As Date, ByVal Administrator As Global.System.Nullable(Of Integer), ByVal Original_DepartmentID As Integer, ByVal Original_Name As String, ByVal Original_Budget As Decimal, ByVal Original_StartDate As Date, ByVal Original_Administrator As Global.System.Nullable(Of Integer)) As Integer
4975 Return Me.Update(Original_DepartmentID, Name, Budget, StartDate, Administrator, Original_DepartmentID, Original_Name, Original_Budget, Original_StartDate, Original_Administrator)
4976 End Function
4977 End Class
4979 '''<summary>
4980 '''Represents the connection and commands used to retrieve and save data.
4981 '''</summary>
4982 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
4983 Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
4984 Global.System.ComponentModel.ToolboxItem(true), _
4985 Global.System.ComponentModel.DataObjectAttribute(true), _
4986 Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
4987 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
4988 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
4989 Partial Public Class OfficeAssignmentTableAdapter
4990 Inherits Global.System.ComponentModel.Component
4992 Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
4994 Private _connection As Global.System.Data.SqlClient.SqlConnection
4996 Private _transaction As Global.System.Data.SqlClient.SqlTransaction
4998 Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
5000 Private _clearBeforeFill As Boolean
5002 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5003 Public Sub New()
5004 MyBase.New
5005 Me.ClearBeforeFill = true
5006 End Sub
5008 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5009 Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
5011 If (Me._adapter Is Nothing) Then
5012 Me.InitAdapter
5013 End If
5014 Return Me._adapter
5015 End Get
5016 End Property
5018 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5019 Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
5021 If (Me._connection Is Nothing) Then
5022 Me.InitConnection
5023 End If
5024 Return Me._connection
5025 End Get
5027 Me._connection = value
5028 If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
5029 Me.Adapter.InsertCommand.Connection = value
5030 End If
5031 If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
5032 Me.Adapter.DeleteCommand.Connection = value
5033 End If
5034 If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
5035 Me.Adapter.UpdateCommand.Connection = value
5036 End If
5037 Dim i As Integer = 0
5038 Do While (i < Me.CommandCollection.Length)
5039 If (Not (Me.CommandCollection(i)) Is Nothing) Then
5040 CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
5041 End If
5042 i = (i + 1)
5043 Loop
5044 End Set
5045 End Property
5047 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5048 Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
5050 Return Me._transaction
5051 End Get
5053 Me._transaction = value
5054 Dim i As Integer = 0
5055 Do While (i < Me.CommandCollection.Length)
5056 Me.CommandCollection(i).Transaction = Me._transaction
5057 i = (i + 1)
5058 Loop
5059 If ((Not (Me.Adapter) Is Nothing) _
5060 AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
5061 Me.Adapter.DeleteCommand.Transaction = Me._transaction
5062 End If
5063 If ((Not (Me.Adapter) Is Nothing) _
5064 AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
5065 Me.Adapter.InsertCommand.Transaction = Me._transaction
5066 End If
5067 If ((Not (Me.Adapter) Is Nothing) _
5068 AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
5069 Me.Adapter.UpdateCommand.Transaction = Me._transaction
5070 End If
5071 End Set
5072 End Property
5074 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5075 Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
5077 If (Me._commandCollection Is Nothing) Then
5078 Me.InitCommandCollection
5079 End If
5080 Return Me._commandCollection
5081 End Get
5082 End Property
5084 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5085 Public Property ClearBeforeFill() As Boolean
5087 Return Me._clearBeforeFill
5088 End Get
5090 Me._clearBeforeFill = value
5091 End Set
5092 End Property
5094 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5095 Private Sub InitAdapter()
5096 Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
5097 Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
5098 tableMapping.SourceTable = "Table"
5099 tableMapping.DataSetTable = "OfficeAssignment"
5100 tableMapping.ColumnMappings.Add("InstructorID", "InstructorID")
5101 tableMapping.ColumnMappings.Add("Location", "Location")
5102 tableMapping.ColumnMappings.Add("Timestamp", "Timestamp")
5103 Me._adapter.TableMappings.Add(tableMapping)
5104 Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
5105 Me._adapter.DeleteCommand.Connection = Me.Connection
5106 Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[OfficeAssignment] WHERE (([InstructorID] = @Original_Instructo"& _
5107 "rID) AND ([Timestamp] = @Original_Timestamp))"
5108 Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
5109 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_InstructorID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "InstructorID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5110 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Timestamp", Global.System.Data.SqlDbType.Timestamp, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Timestamp", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5111 Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
5112 Me._adapter.InsertCommand.Connection = Me.Connection
5113 Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[OfficeAssignment] ([InstructorID], [Location]) VALUES (@Instru"& _
5114 "ctorID, @Location);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT InstructorID, Location, Timestamp FROM OfficeAssignm"& _
5115 "ent WHERE (InstructorID = @InstructorID)"
5116 Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
5117 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@InstructorID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "InstructorID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5118 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Location", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Location", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5119 Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
5120 Me._adapter.UpdateCommand.Connection = Me.Connection
5121 Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[OfficeAssignment] SET [InstructorID] = @InstructorID, [Location] = "& _
5122 "@Location WHERE (([InstructorID] = @Original_InstructorID) AND ([Timestamp] = @O"& _
5123 "riginal_Timestamp));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT InstructorID, Location, Timestamp FROM OfficeAssign"& _
5124 "ment WHERE (InstructorID = @InstructorID)"
5125 Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
5126 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@InstructorID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "InstructorID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5127 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Location", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Location", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5128 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_InstructorID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "InstructorID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5129 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Timestamp", Global.System.Data.SqlDbType.Timestamp, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Timestamp", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5130 End Sub
5132 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5133 Private Sub InitConnection()
5134 Me._connection = New Global.System.Data.SqlClient.SqlConnection
5135 Me._connection.ConnectionString = Global.VBUseADONET.My.MySettings.Default.SQLServer2005DBConnectionString
5136 End Sub
5138 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5139 Private Sub InitCommandCollection()
5140 Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
5141 Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
5142 Me._commandCollection(0).Connection = Me.Connection
5143 Me._commandCollection(0).CommandText = "SELECT InstructorID, Location, Timestamp FROM dbo.OfficeAssignment"
5144 Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
5145 End Sub
5147 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5148 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5149 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
5150 Public Overloads Overridable Function Fill(ByVal dataTable As SQLServer2005DBDataSet.OfficeAssignmentDataTable) As Integer
5151 Me.Adapter.SelectCommand = Me.CommandCollection(0)
5152 If (Me.ClearBeforeFill = true) Then
5153 dataTable.Clear
5154 End If
5155 Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
5156 Return returnValue
5157 End Function
5159 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5160 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5161 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
5162 Public Overloads Overridable Function GetData() As SQLServer2005DBDataSet.OfficeAssignmentDataTable
5163 Me.Adapter.SelectCommand = Me.CommandCollection(0)
5164 Dim dataTable As SQLServer2005DBDataSet.OfficeAssignmentDataTable = New SQLServer2005DBDataSet.OfficeAssignmentDataTable
5165 Me.Adapter.Fill(dataTable)
5166 Return dataTable
5167 End Function
5169 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5170 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5171 Public Overloads Overridable Function Update(ByVal dataTable As SQLServer2005DBDataSet.OfficeAssignmentDataTable) As Integer
5172 Return Me.Adapter.Update(dataTable)
5173 End Function
5175 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5176 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5177 Public Overloads Overridable Function Update(ByVal dataSet As SQLServer2005DBDataSet) As Integer
5178 Return Me.Adapter.Update(dataSet, "OfficeAssignment")
5179 End Function
5181 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5182 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5183 Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
5184 Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
5185 End Function
5187 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5188 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5189 Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
5190 Return Me.Adapter.Update(dataRows)
5191 End Function
5193 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5194 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5195 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
5196 Public Overloads Overridable Function Delete(ByVal Original_InstructorID As Integer, ByVal Original_Timestamp() As Byte) As Integer
5197 Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_InstructorID,Integer)
5198 If (Original_Timestamp Is Nothing) Then
5199 Throw New Global.System.ArgumentNullException("Original_Timestamp")
5200 Else
5201 Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_Timestamp,Byte())
5202 End If
5203 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
5204 If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
5205 <> Global.System.Data.ConnectionState.Open) Then
5206 Me.Adapter.DeleteCommand.Connection.Open
5207 End If
5208 Try
5209 Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
5210 Return returnValue
5211 Finally
5212 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
5213 Me.Adapter.DeleteCommand.Connection.Close
5214 End If
5215 End Try
5216 End Function
5218 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5219 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5220 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
5221 Public Overloads Overridable Function Insert(ByVal InstructorID As Integer, ByVal Location As String) As Integer
5222 Me.Adapter.InsertCommand.Parameters(0).Value = CType(InstructorID,Integer)
5223 If (Location Is Nothing) Then
5224 Throw New Global.System.ArgumentNullException("Location")
5225 Else
5226 Me.Adapter.InsertCommand.Parameters(1).Value = CType(Location,String)
5227 End If
5228 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
5229 If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
5230 <> Global.System.Data.ConnectionState.Open) Then
5231 Me.Adapter.InsertCommand.Connection.Open
5232 End If
5233 Try
5234 Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
5235 Return returnValue
5236 Finally
5237 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
5238 Me.Adapter.InsertCommand.Connection.Close
5239 End If
5240 End Try
5241 End Function
5243 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5244 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5245 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
5246 Public Overloads Overridable Function Update(ByVal InstructorID As Integer, ByVal Location As String, ByVal Original_InstructorID As Integer, ByVal Original_Timestamp() As Byte) As Integer
5247 Me.Adapter.UpdateCommand.Parameters(0).Value = CType(InstructorID,Integer)
5248 If (Location Is Nothing) Then
5249 Throw New Global.System.ArgumentNullException("Location")
5250 Else
5251 Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Location,String)
5252 End If
5253 Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Original_InstructorID,Integer)
5254 If (Original_Timestamp Is Nothing) Then
5255 Throw New Global.System.ArgumentNullException("Original_Timestamp")
5256 Else
5257 Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_Timestamp,Byte())
5258 End If
5259 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
5260 If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
5261 <> Global.System.Data.ConnectionState.Open) Then
5262 Me.Adapter.UpdateCommand.Connection.Open
5263 End If
5264 Try
5265 Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
5266 Return returnValue
5267 Finally
5268 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
5269 Me.Adapter.UpdateCommand.Connection.Close
5270 End If
5271 End Try
5272 End Function
5274 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5275 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5276 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
5277 Public Overloads Overridable Function Update(ByVal Location As String, ByVal Original_InstructorID As Integer, ByVal Original_Timestamp() As Byte) As Integer
5278 Return Me.Update(Original_InstructorID, Location, Original_InstructorID, Original_Timestamp)
5279 End Function
5280 End Class
5282 '''<summary>
5283 '''Represents the connection and commands used to retrieve and save data.
5284 '''</summary>
5285 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
5286 Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
5287 Global.System.ComponentModel.ToolboxItem(true), _
5288 Global.System.ComponentModel.DataObjectAttribute(true), _
5289 Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
5290 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
5291 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5292 Partial Public Class OnlineCourseTableAdapter
5293 Inherits Global.System.ComponentModel.Component
5295 Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
5297 Private _connection As Global.System.Data.SqlClient.SqlConnection
5299 Private _transaction As Global.System.Data.SqlClient.SqlTransaction
5301 Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
5303 Private _clearBeforeFill As Boolean
5305 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5306 Public Sub New()
5307 MyBase.New
5308 Me.ClearBeforeFill = true
5309 End Sub
5311 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5312 Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
5314 If (Me._adapter Is Nothing) Then
5315 Me.InitAdapter
5316 End If
5317 Return Me._adapter
5318 End Get
5319 End Property
5321 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5322 Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
5324 If (Me._connection Is Nothing) Then
5325 Me.InitConnection
5326 End If
5327 Return Me._connection
5328 End Get
5330 Me._connection = value
5331 If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
5332 Me.Adapter.InsertCommand.Connection = value
5333 End If
5334 If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
5335 Me.Adapter.DeleteCommand.Connection = value
5336 End If
5337 If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
5338 Me.Adapter.UpdateCommand.Connection = value
5339 End If
5340 Dim i As Integer = 0
5341 Do While (i < Me.CommandCollection.Length)
5342 If (Not (Me.CommandCollection(i)) Is Nothing) Then
5343 CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
5344 End If
5345 i = (i + 1)
5346 Loop
5347 End Set
5348 End Property
5350 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5351 Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
5353 Return Me._transaction
5354 End Get
5356 Me._transaction = value
5357 Dim i As Integer = 0
5358 Do While (i < Me.CommandCollection.Length)
5359 Me.CommandCollection(i).Transaction = Me._transaction
5360 i = (i + 1)
5361 Loop
5362 If ((Not (Me.Adapter) Is Nothing) _
5363 AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
5364 Me.Adapter.DeleteCommand.Transaction = Me._transaction
5365 End If
5366 If ((Not (Me.Adapter) Is Nothing) _
5367 AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
5368 Me.Adapter.InsertCommand.Transaction = Me._transaction
5369 End If
5370 If ((Not (Me.Adapter) Is Nothing) _
5371 AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
5372 Me.Adapter.UpdateCommand.Transaction = Me._transaction
5373 End If
5374 End Set
5375 End Property
5377 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5378 Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
5380 If (Me._commandCollection Is Nothing) Then
5381 Me.InitCommandCollection
5382 End If
5383 Return Me._commandCollection
5384 End Get
5385 End Property
5387 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5388 Public Property ClearBeforeFill() As Boolean
5390 Return Me._clearBeforeFill
5391 End Get
5393 Me._clearBeforeFill = value
5394 End Set
5395 End Property
5397 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5398 Private Sub InitAdapter()
5399 Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
5400 Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
5401 tableMapping.SourceTable = "Table"
5402 tableMapping.DataSetTable = "OnlineCourse"
5403 tableMapping.ColumnMappings.Add("CourseID", "CourseID")
5404 tableMapping.ColumnMappings.Add("URL", "URL")
5405 Me._adapter.TableMappings.Add(tableMapping)
5406 Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
5407 Me._adapter.DeleteCommand.Connection = Me.Connection
5408 Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[OnlineCourse] WHERE (([CourseID] = @Original_CourseID) AND ([U"& _
5409 "RL] = @Original_URL))"
5410 Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
5411 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5412 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_URL", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "URL", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5413 Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
5414 Me._adapter.InsertCommand.Connection = Me.Connection
5415 Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[OnlineCourse] ([CourseID], [URL]) VALUES (@CourseID, @URL);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"S"& _
5416 "ELECT CourseID, URL FROM OnlineCourse WHERE (CourseID = @CourseID)"
5417 Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
5418 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5419 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@URL", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "URL", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5420 Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
5421 Me._adapter.UpdateCommand.Connection = Me.Connection
5422 Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[OnlineCourse] SET [CourseID] = @CourseID, [URL] = @URL WHERE (([Cou"& _
5423 "rseID] = @Original_CourseID) AND ([URL] = @Original_URL));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, URL"& _
5424 " FROM OnlineCourse WHERE (CourseID = @CourseID)"
5425 Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
5426 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5427 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@URL", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "URL", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5428 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5429 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_URL", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "URL", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5430 End Sub
5432 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5433 Private Sub InitConnection()
5434 Me._connection = New Global.System.Data.SqlClient.SqlConnection
5435 Me._connection.ConnectionString = Global.VBUseADONET.My.MySettings.Default.SQLServer2005DBConnectionString
5436 End Sub
5438 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5439 Private Sub InitCommandCollection()
5440 Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
5441 Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
5442 Me._commandCollection(0).Connection = Me.Connection
5443 Me._commandCollection(0).CommandText = "SELECT CourseID, URL FROM dbo.OnlineCourse"
5444 Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
5445 End Sub
5447 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5448 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5449 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
5450 Public Overloads Overridable Function Fill(ByVal dataTable As SQLServer2005DBDataSet.OnlineCourseDataTable) As Integer
5451 Me.Adapter.SelectCommand = Me.CommandCollection(0)
5452 If (Me.ClearBeforeFill = true) Then
5453 dataTable.Clear
5454 End If
5455 Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
5456 Return returnValue
5457 End Function
5459 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5460 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5461 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
5462 Public Overloads Overridable Function GetData() As SQLServer2005DBDataSet.OnlineCourseDataTable
5463 Me.Adapter.SelectCommand = Me.CommandCollection(0)
5464 Dim dataTable As SQLServer2005DBDataSet.OnlineCourseDataTable = New SQLServer2005DBDataSet.OnlineCourseDataTable
5465 Me.Adapter.Fill(dataTable)
5466 Return dataTable
5467 End Function
5469 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5470 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5471 Public Overloads Overridable Function Update(ByVal dataTable As SQLServer2005DBDataSet.OnlineCourseDataTable) As Integer
5472 Return Me.Adapter.Update(dataTable)
5473 End Function
5475 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5476 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5477 Public Overloads Overridable Function Update(ByVal dataSet As SQLServer2005DBDataSet) As Integer
5478 Return Me.Adapter.Update(dataSet, "OnlineCourse")
5479 End Function
5481 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5482 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5483 Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
5484 Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
5485 End Function
5487 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5488 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5489 Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
5490 Return Me.Adapter.Update(dataRows)
5491 End Function
5493 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5494 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5495 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
5496 Public Overloads Overridable Function Delete(ByVal Original_CourseID As Integer, ByVal Original_URL As String) As Integer
5497 Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_CourseID,Integer)
5498 If (Original_URL Is Nothing) Then
5499 Throw New Global.System.ArgumentNullException("Original_URL")
5500 Else
5501 Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_URL,String)
5502 End If
5503 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
5504 If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
5505 <> Global.System.Data.ConnectionState.Open) Then
5506 Me.Adapter.DeleteCommand.Connection.Open
5507 End If
5508 Try
5509 Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
5510 Return returnValue
5511 Finally
5512 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
5513 Me.Adapter.DeleteCommand.Connection.Close
5514 End If
5515 End Try
5516 End Function
5518 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5519 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5520 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
5521 Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal URL As String) As Integer
5522 Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
5523 If (URL Is Nothing) Then
5524 Throw New Global.System.ArgumentNullException("URL")
5525 Else
5526 Me.Adapter.InsertCommand.Parameters(1).Value = CType(URL,String)
5527 End If
5528 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
5529 If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
5530 <> Global.System.Data.ConnectionState.Open) Then
5531 Me.Adapter.InsertCommand.Connection.Open
5532 End If
5533 Try
5534 Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
5535 Return returnValue
5536 Finally
5537 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
5538 Me.Adapter.InsertCommand.Connection.Close
5539 End If
5540 End Try
5541 End Function
5543 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5544 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5545 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
5546 Public Overloads Overridable Function Update(ByVal CourseID As Integer, ByVal URL As String, ByVal Original_CourseID As Integer, ByVal Original_URL As String) As Integer
5547 Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
5548 If (URL Is Nothing) Then
5549 Throw New Global.System.ArgumentNullException("URL")
5550 Else
5551 Me.Adapter.UpdateCommand.Parameters(1).Value = CType(URL,String)
5552 End If
5553 Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Original_CourseID,Integer)
5554 If (Original_URL Is Nothing) Then
5555 Throw New Global.System.ArgumentNullException("Original_URL")
5556 Else
5557 Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Original_URL,String)
5558 End If
5559 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
5560 If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
5561 <> Global.System.Data.ConnectionState.Open) Then
5562 Me.Adapter.UpdateCommand.Connection.Open
5563 End If
5564 Try
5565 Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
5566 Return returnValue
5567 Finally
5568 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
5569 Me.Adapter.UpdateCommand.Connection.Close
5570 End If
5571 End Try
5572 End Function
5574 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5575 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5576 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
5577 Public Overloads Overridable Function Update(ByVal URL As String, ByVal Original_CourseID As Integer, ByVal Original_URL As String) As Integer
5578 Return Me.Update(Original_CourseID, URL, Original_CourseID, Original_URL)
5579 End Function
5580 End Class
5582 '''<summary>
5583 '''Represents the connection and commands used to retrieve and save data.
5584 '''</summary>
5585 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
5586 Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
5587 Global.System.ComponentModel.ToolboxItem(true), _
5588 Global.System.ComponentModel.DataObjectAttribute(true), _
5589 Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
5590 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
5591 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5592 Partial Public Class OnsiteCourseTableAdapter
5593 Inherits Global.System.ComponentModel.Component
5595 Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
5597 Private _connection As Global.System.Data.SqlClient.SqlConnection
5599 Private _transaction As Global.System.Data.SqlClient.SqlTransaction
5601 Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
5603 Private _clearBeforeFill As Boolean
5605 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5606 Public Sub New()
5607 MyBase.New
5608 Me.ClearBeforeFill = true
5609 End Sub
5611 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5612 Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
5614 If (Me._adapter Is Nothing) Then
5615 Me.InitAdapter
5616 End If
5617 Return Me._adapter
5618 End Get
5619 End Property
5621 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5622 Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
5624 If (Me._connection Is Nothing) Then
5625 Me.InitConnection
5626 End If
5627 Return Me._connection
5628 End Get
5630 Me._connection = value
5631 If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
5632 Me.Adapter.InsertCommand.Connection = value
5633 End If
5634 If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
5635 Me.Adapter.DeleteCommand.Connection = value
5636 End If
5637 If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
5638 Me.Adapter.UpdateCommand.Connection = value
5639 End If
5640 Dim i As Integer = 0
5641 Do While (i < Me.CommandCollection.Length)
5642 If (Not (Me.CommandCollection(i)) Is Nothing) Then
5643 CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
5644 End If
5645 i = (i + 1)
5646 Loop
5647 End Set
5648 End Property
5650 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5651 Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
5653 Return Me._transaction
5654 End Get
5656 Me._transaction = value
5657 Dim i As Integer = 0
5658 Do While (i < Me.CommandCollection.Length)
5659 Me.CommandCollection(i).Transaction = Me._transaction
5660 i = (i + 1)
5661 Loop
5662 If ((Not (Me.Adapter) Is Nothing) _
5663 AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
5664 Me.Adapter.DeleteCommand.Transaction = Me._transaction
5665 End If
5666 If ((Not (Me.Adapter) Is Nothing) _
5667 AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
5668 Me.Adapter.InsertCommand.Transaction = Me._transaction
5669 End If
5670 If ((Not (Me.Adapter) Is Nothing) _
5671 AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
5672 Me.Adapter.UpdateCommand.Transaction = Me._transaction
5673 End If
5674 End Set
5675 End Property
5677 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5678 Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
5680 If (Me._commandCollection Is Nothing) Then
5681 Me.InitCommandCollection
5682 End If
5683 Return Me._commandCollection
5684 End Get
5685 End Property
5687 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5688 Public Property ClearBeforeFill() As Boolean
5690 Return Me._clearBeforeFill
5691 End Get
5693 Me._clearBeforeFill = value
5694 End Set
5695 End Property
5697 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5698 Private Sub InitAdapter()
5699 Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
5700 Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
5701 tableMapping.SourceTable = "Table"
5702 tableMapping.DataSetTable = "OnsiteCourse"
5703 tableMapping.ColumnMappings.Add("CourseID", "CourseID")
5704 tableMapping.ColumnMappings.Add("Location", "Location")
5705 tableMapping.ColumnMappings.Add("Days", "Days")
5706 tableMapping.ColumnMappings.Add("Time", "Time")
5707 Me._adapter.TableMappings.Add(tableMapping)
5708 Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
5709 Me._adapter.DeleteCommand.Connection = Me.Connection
5710 Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[OnsiteCourse] WHERE (([CourseID] = @Original_CourseID) AND ([L"& _
5711 "ocation] = @Original_Location) AND ([Days] = @Original_Days) AND ([Time] = @Orig"& _
5712 "inal_Time))"
5713 Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
5714 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5715 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Location", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Location", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5716 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Days", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Days", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5717 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Time", Global.System.Data.SqlDbType.SmallDateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Time", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5718 Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
5719 Me._adapter.InsertCommand.Connection = Me.Connection
5720 Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[OnsiteCourse] ([CourseID], [Location], [Days], [Time]) VALUES "& _
5721 "(@CourseID, @Location, @Days, @Time);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, Location, Days, Time FRO"& _
5722 "M OnsiteCourse WHERE (CourseID = @CourseID)"
5723 Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
5724 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5725 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Location", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Location", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5726 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Days", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Days", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5727 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Time", Global.System.Data.SqlDbType.SmallDateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Time", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5728 Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
5729 Me._adapter.UpdateCommand.Connection = Me.Connection
5730 Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[OnsiteCourse] SET [CourseID] = @CourseID, [Location] = @Location, ["& _
5731 "Days] = @Days, [Time] = @Time WHERE (([CourseID] = @Original_CourseID) AND ([Loc"& _
5732 "ation] = @Original_Location) AND ([Days] = @Original_Days) AND ([Time] = @Origin"& _
5733 "al_Time));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT CourseID, Location, Days, Time FROM OnsiteCourse WHERE (Cours"& _
5734 "eID = @CourseID)"
5735 Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
5736 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5737 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Location", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Location", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5738 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Days", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Days", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5739 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Time", Global.System.Data.SqlDbType.SmallDateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Time", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
5740 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_CourseID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "CourseID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5741 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Location", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Location", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5742 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Days", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Days", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5743 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_Time", Global.System.Data.SqlDbType.SmallDateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Time", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
5744 End Sub
5746 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5747 Private Sub InitConnection()
5748 Me._connection = New Global.System.Data.SqlClient.SqlConnection
5749 Me._connection.ConnectionString = Global.VBUseADONET.My.Settings.SQLServer2005DBConnectionString
5750 End Sub
5752 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5753 Private Sub InitCommandCollection()
5754 Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
5755 Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
5756 Me._commandCollection(0).Connection = Me.Connection
5757 Me._commandCollection(0).CommandText = "SELECT CourseID, Location, Days, Time FROM dbo.OnsiteCourse"
5758 Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
5759 End Sub
5761 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5762 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5763 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
5764 Public Overloads Overridable Function Fill(ByVal dataTable As SQLServer2005DBDataSet.OnsiteCourseDataTable) As Integer
5765 Me.Adapter.SelectCommand = Me.CommandCollection(0)
5766 If (Me.ClearBeforeFill = true) Then
5767 dataTable.Clear
5768 End If
5769 Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
5770 Return returnValue
5771 End Function
5773 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5774 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5775 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
5776 Public Overloads Overridable Function GetData() As SQLServer2005DBDataSet.OnsiteCourseDataTable
5777 Me.Adapter.SelectCommand = Me.CommandCollection(0)
5778 Dim dataTable As SQLServer2005DBDataSet.OnsiteCourseDataTable = New SQLServer2005DBDataSet.OnsiteCourseDataTable
5779 Me.Adapter.Fill(dataTable)
5780 Return dataTable
5781 End Function
5783 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5784 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5785 Public Overloads Overridable Function Update(ByVal dataTable As SQLServer2005DBDataSet.OnsiteCourseDataTable) As Integer
5786 Return Me.Adapter.Update(dataTable)
5787 End Function
5789 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5790 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5791 Public Overloads Overridable Function Update(ByVal dataSet As SQLServer2005DBDataSet) As Integer
5792 Return Me.Adapter.Update(dataSet, "OnsiteCourse")
5793 End Function
5795 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5796 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5797 Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
5798 Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
5799 End Function
5801 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5802 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5803 Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
5804 Return Me.Adapter.Update(dataRows)
5805 End Function
5807 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5808 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5809 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
5810 Public Overloads Overridable Function Delete(ByVal Original_CourseID As Integer, ByVal Original_Location As String, ByVal Original_Days As String, ByVal Original_Time As Date) As Integer
5811 Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_CourseID,Integer)
5812 If (Original_Location Is Nothing) Then
5813 Throw New Global.System.ArgumentNullException("Original_Location")
5814 Else
5815 Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_Location,String)
5816 End If
5817 If (Original_Days Is Nothing) Then
5818 Throw New Global.System.ArgumentNullException("Original_Days")
5819 Else
5820 Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_Days,String)
5821 End If
5822 Me.Adapter.DeleteCommand.Parameters(3).Value = CType(Original_Time,Date)
5823 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
5824 If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
5825 <> Global.System.Data.ConnectionState.Open) Then
5826 Me.Adapter.DeleteCommand.Connection.Open
5827 End If
5828 Try
5829 Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
5830 Return returnValue
5831 Finally
5832 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
5833 Me.Adapter.DeleteCommand.Connection.Close
5834 End If
5835 End Try
5836 End Function
5838 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5839 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5840 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
5841 Public Overloads Overridable Function Insert(ByVal CourseID As Integer, ByVal Location As String, ByVal Days As String, ByVal Time As Date) As Integer
5842 Me.Adapter.InsertCommand.Parameters(0).Value = CType(CourseID,Integer)
5843 If (Location Is Nothing) Then
5844 Throw New Global.System.ArgumentNullException("Location")
5845 Else
5846 Me.Adapter.InsertCommand.Parameters(1).Value = CType(Location,String)
5847 End If
5848 If (Days Is Nothing) Then
5849 Throw New Global.System.ArgumentNullException("Days")
5850 Else
5851 Me.Adapter.InsertCommand.Parameters(2).Value = CType(Days,String)
5852 End If
5853 Me.Adapter.InsertCommand.Parameters(3).Value = CType(Time,Date)
5854 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
5855 If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
5856 <> Global.System.Data.ConnectionState.Open) Then
5857 Me.Adapter.InsertCommand.Connection.Open
5858 End If
5859 Try
5860 Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
5861 Return returnValue
5862 Finally
5863 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
5864 Me.Adapter.InsertCommand.Connection.Close
5865 End If
5866 End Try
5867 End Function
5869 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5870 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5871 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
5872 Public Overloads Overridable Function Update(ByVal CourseID As Integer, ByVal Location As String, ByVal Days As String, ByVal Time As Date, ByVal Original_CourseID As Integer, ByVal Original_Location As String, ByVal Original_Days As String, ByVal Original_Time As Date) As Integer
5873 Me.Adapter.UpdateCommand.Parameters(0).Value = CType(CourseID,Integer)
5874 If (Location Is Nothing) Then
5875 Throw New Global.System.ArgumentNullException("Location")
5876 Else
5877 Me.Adapter.UpdateCommand.Parameters(1).Value = CType(Location,String)
5878 End If
5879 If (Days Is Nothing) Then
5880 Throw New Global.System.ArgumentNullException("Days")
5881 Else
5882 Me.Adapter.UpdateCommand.Parameters(2).Value = CType(Days,String)
5883 End If
5884 Me.Adapter.UpdateCommand.Parameters(3).Value = CType(Time,Date)
5885 Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Original_CourseID,Integer)
5886 If (Original_Location Is Nothing) Then
5887 Throw New Global.System.ArgumentNullException("Original_Location")
5888 Else
5889 Me.Adapter.UpdateCommand.Parameters(5).Value = CType(Original_Location,String)
5890 End If
5891 If (Original_Days Is Nothing) Then
5892 Throw New Global.System.ArgumentNullException("Original_Days")
5893 Else
5894 Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_Days,String)
5895 End If
5896 Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_Time,Date)
5897 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
5898 If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
5899 <> Global.System.Data.ConnectionState.Open) Then
5900 Me.Adapter.UpdateCommand.Connection.Open
5901 End If
5902 Try
5903 Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
5904 Return returnValue
5905 Finally
5906 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
5907 Me.Adapter.UpdateCommand.Connection.Close
5908 End If
5909 End Try
5910 End Function
5912 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
5913 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
5914 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
5915 Public Overloads Overridable Function Update(ByVal Location As String, ByVal Days As String, ByVal Time As Date, ByVal Original_CourseID As Integer, ByVal Original_Location As String, ByVal Original_Days As String, ByVal Original_Time As Date) As Integer
5916 Return Me.Update(Original_CourseID, Location, Days, Time, Original_CourseID, Original_Location, Original_Days, Original_Time)
5917 End Function
5918 End Class
5920 '''<summary>
5921 '''Represents the connection and commands used to retrieve and save data.
5922 '''</summary>
5923 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
5924 Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
5925 Global.System.ComponentModel.ToolboxItem(true), _
5926 Global.System.ComponentModel.DataObjectAttribute(true), _
5927 Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
5928 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
5929 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
5930 Partial Public Class PersonTableAdapter
5931 Inherits Global.System.ComponentModel.Component
5933 Private WithEvents _adapter As Global.System.Data.SqlClient.SqlDataAdapter
5935 Private _connection As Global.System.Data.SqlClient.SqlConnection
5937 Private _transaction As Global.System.Data.SqlClient.SqlTransaction
5939 Private _commandCollection() As Global.System.Data.SqlClient.SqlCommand
5941 Private _clearBeforeFill As Boolean
5943 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5944 Public Sub New()
5945 MyBase.New
5946 Me.ClearBeforeFill = true
5947 End Sub
5949 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5950 Protected Friend ReadOnly Property Adapter() As Global.System.Data.SqlClient.SqlDataAdapter
5952 If (Me._adapter Is Nothing) Then
5953 Me.InitAdapter
5954 End If
5955 Return Me._adapter
5956 End Get
5957 End Property
5959 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5960 Friend Property Connection() As Global.System.Data.SqlClient.SqlConnection
5962 If (Me._connection Is Nothing) Then
5963 Me.InitConnection
5964 End If
5965 Return Me._connection
5966 End Get
5968 Me._connection = value
5969 If (Not (Me.Adapter.InsertCommand) Is Nothing) Then
5970 Me.Adapter.InsertCommand.Connection = value
5971 End If
5972 If (Not (Me.Adapter.DeleteCommand) Is Nothing) Then
5973 Me.Adapter.DeleteCommand.Connection = value
5974 End If
5975 If (Not (Me.Adapter.UpdateCommand) Is Nothing) Then
5976 Me.Adapter.UpdateCommand.Connection = value
5977 End If
5978 Dim i As Integer = 0
5979 Do While (i < Me.CommandCollection.Length)
5980 If (Not (Me.CommandCollection(i)) Is Nothing) Then
5981 CType(Me.CommandCollection(i),Global.System.Data.SqlClient.SqlCommand).Connection = value
5982 End If
5983 i = (i + 1)
5984 Loop
5985 End Set
5986 End Property
5988 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
5989 Friend Property Transaction() As Global.System.Data.SqlClient.SqlTransaction
5991 Return Me._transaction
5992 End Get
5994 Me._transaction = value
5995 Dim i As Integer = 0
5996 Do While (i < Me.CommandCollection.Length)
5997 Me.CommandCollection(i).Transaction = Me._transaction
5998 i = (i + 1)
5999 Loop
6000 If ((Not (Me.Adapter) Is Nothing) _
6001 AndAlso (Not (Me.Adapter.DeleteCommand) Is Nothing)) Then
6002 Me.Adapter.DeleteCommand.Transaction = Me._transaction
6003 End If
6004 If ((Not (Me.Adapter) Is Nothing) _
6005 AndAlso (Not (Me.Adapter.InsertCommand) Is Nothing)) Then
6006 Me.Adapter.InsertCommand.Transaction = Me._transaction
6007 End If
6008 If ((Not (Me.Adapter) Is Nothing) _
6009 AndAlso (Not (Me.Adapter.UpdateCommand) Is Nothing)) Then
6010 Me.Adapter.UpdateCommand.Transaction = Me._transaction
6011 End If
6012 End Set
6013 End Property
6015 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
6016 Protected ReadOnly Property CommandCollection() As Global.System.Data.SqlClient.SqlCommand()
6018 If (Me._commandCollection Is Nothing) Then
6019 Me.InitCommandCollection
6020 End If
6021 Return Me._commandCollection
6022 End Get
6023 End Property
6025 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
6026 Public Property ClearBeforeFill() As Boolean
6028 Return Me._clearBeforeFill
6029 End Get
6031 Me._clearBeforeFill = value
6032 End Set
6033 End Property
6035 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
6036 Private Sub InitAdapter()
6037 Me._adapter = New Global.System.Data.SqlClient.SqlDataAdapter
6038 Dim tableMapping As Global.System.Data.Common.DataTableMapping = New Global.System.Data.Common.DataTableMapping
6039 tableMapping.SourceTable = "Table"
6040 tableMapping.DataSetTable = "Person"
6041 tableMapping.ColumnMappings.Add("PersonID", "PersonID")
6042 tableMapping.ColumnMappings.Add("LastName", "LastName")
6043 tableMapping.ColumnMappings.Add("FirstName", "FirstName")
6044 tableMapping.ColumnMappings.Add("HireDate", "HireDate")
6045 tableMapping.ColumnMappings.Add("EnrollmentDate", "EnrollmentDate")
6046 tableMapping.ColumnMappings.Add("Picture", "Picture")
6047 tableMapping.ColumnMappings.Add("PersonCategory", "PersonCategory")
6048 Me._adapter.TableMappings.Add(tableMapping)
6049 Me._adapter.DeleteCommand = New Global.System.Data.SqlClient.SqlCommand
6050 Me._adapter.DeleteCommand.Connection = Me.Connection
6051 Me._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Person] WHERE (([PersonID] = @Original_PersonID) AND ([LastNam"& _
6052 "e] = @Original_LastName) AND ([FirstName] = @Original_FirstName) AND ((@IsNull_H"& _
6053 "ireDate = 1 AND [HireDate] IS NULL) OR ([HireDate] = @Original_HireDate)) AND (("& _
6054 "@IsNull_EnrollmentDate = 1 AND [EnrollmentDate] IS NULL) OR ([EnrollmentDate] = "& _
6055 "@Original_EnrollmentDate)) AND ([PersonCategory] = @Original_PersonCategory))"
6056 Me._adapter.DeleteCommand.CommandType = Global.System.Data.CommandType.Text
6057 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_PersonID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
6058 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_LastName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LastName", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
6059 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_FirstName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FirstName", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
6060 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_HireDate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HireDate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
6061 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HireDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HireDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
6062 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_EnrollmentDate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentDate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
6063 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_EnrollmentDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
6064 Me._adapter.DeleteCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_PersonCategory", Global.System.Data.SqlDbType.SmallInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonCategory", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
6065 Me._adapter.InsertCommand = New Global.System.Data.SqlClient.SqlCommand
6066 Me._adapter.InsertCommand.Connection = Me.Connection
6067 Me._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Person] ([LastName], [FirstName], [HireDate], [EnrollmentDate]"& _
6068 ", [Picture], [PersonCategory]) VALUES (@LastName, @FirstName, @HireDate, @Enroll"& _
6069 "mentDate, @Picture, @PersonCategory);"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT PersonID, LastName, FirstName, Hir"& _
6070 "eDate, EnrollmentDate, Picture, PersonCategory FROM Person WHERE (PersonID = SCO"& _
6071 "PE_IDENTITY())"
6072 Me._adapter.InsertCommand.CommandType = Global.System.Data.CommandType.Text
6073 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@LastName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LastName", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
6074 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FirstName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FirstName", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
6075 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HireDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HireDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
6076 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EnrollmentDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
6077 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Picture", Global.System.Data.SqlDbType.Image, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Picture", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
6078 Me._adapter.InsertCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PersonCategory", Global.System.Data.SqlDbType.SmallInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonCategory", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
6079 Me._adapter.UpdateCommand = New Global.System.Data.SqlClient.SqlCommand
6080 Me._adapter.UpdateCommand.Connection = Me.Connection
6081 Me._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Person] SET [LastName] = @LastName, [FirstName] = @FirstName, [Hire"& _
6082 "Date] = @HireDate, [EnrollmentDate] = @EnrollmentDate, [Picture] = @Picture, [Pe"& _
6083 "rsonCategory] = @PersonCategory WHERE (([PersonID] = @Original_PersonID) AND ([L"& _
6084 "astName] = @Original_LastName) AND ([FirstName] = @Original_FirstName) AND ((@Is"& _
6085 "Null_HireDate = 1 AND [HireDate] IS NULL) OR ([HireDate] = @Original_HireDate)) "& _
6086 "AND ((@IsNull_EnrollmentDate = 1 AND [EnrollmentDate] IS NULL) OR ([EnrollmentDa"& _
6087 "te] = @Original_EnrollmentDate)) AND ([PersonCategory] = @Original_PersonCategor"& _
6088 "y));"&Global.Microsoft.VisualBasic.ChrW(13)&Global.Microsoft.VisualBasic.ChrW(10)&"SELECT PersonID, LastName, FirstName, HireDate, EnrollmentDate, Picture, P"& _
6089 "ersonCategory FROM Person WHERE (PersonID = @PersonID)"
6090 Me._adapter.UpdateCommand.CommandType = Global.System.Data.CommandType.Text
6091 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@LastName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LastName", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
6092 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@FirstName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FirstName", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
6093 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@HireDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HireDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
6094 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@EnrollmentDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentDate", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
6095 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Picture", Global.System.Data.SqlDbType.Image, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "Picture", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
6096 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PersonCategory", Global.System.Data.SqlDbType.SmallInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonCategory", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
6097 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_PersonID", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonID", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
6098 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_LastName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "LastName", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
6099 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_FirstName", Global.System.Data.SqlDbType.NVarChar, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "FirstName", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
6100 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_HireDate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HireDate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
6101 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_HireDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "HireDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
6102 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@IsNull_EnrollmentDate", Global.System.Data.SqlDbType.Int, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentDate", Global.System.Data.DataRowVersion.Original, true, Nothing, "", "", ""))
6103 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_EnrollmentDate", Global.System.Data.SqlDbType.DateTime, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "EnrollmentDate", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
6104 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@Original_PersonCategory", Global.System.Data.SqlDbType.SmallInt, 0, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonCategory", Global.System.Data.DataRowVersion.Original, false, Nothing, "", "", ""))
6105 Me._adapter.UpdateCommand.Parameters.Add(New Global.System.Data.SqlClient.SqlParameter("@PersonID", Global.System.Data.SqlDbType.Int, 4, Global.System.Data.ParameterDirection.Input, 0, 0, "PersonID", Global.System.Data.DataRowVersion.Current, false, Nothing, "", "", ""))
6106 End Sub
6108 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
6109 Private Sub InitConnection()
6110 Me._connection = New Global.System.Data.SqlClient.SqlConnection
6111 Me._connection.ConnectionString = Global.VBUseADONET.My.Settings.SQLServer2005DBConnectionString
6112 End Sub
6114 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
6115 Private Sub InitCommandCollection()
6116 Me._commandCollection = New Global.System.Data.SqlClient.SqlCommand(0) {}
6117 Me._commandCollection(0) = New Global.System.Data.SqlClient.SqlCommand
6118 Me._commandCollection(0).Connection = Me.Connection
6119 Me._commandCollection(0).CommandText = "SELECT PersonID, LastName, FirstName, HireDate, EnrollmentDate, Picture, PersonCa"& _
6120 "tegory FROM dbo.Person"
6121 Me._commandCollection(0).CommandType = Global.System.Data.CommandType.Text
6122 End Sub
6124 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6125 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
6126 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Fill, true)> _
6127 Public Overloads Overridable Function Fill(ByVal dataTable As SQLServer2005DBDataSet.PersonDataTable) As Integer
6128 Me.Adapter.SelectCommand = Me.CommandCollection(0)
6129 If (Me.ClearBeforeFill = true) Then
6130 dataTable.Clear
6131 End If
6132 Dim returnValue As Integer = Me.Adapter.Fill(dataTable)
6133 Return returnValue
6134 End Function
6136 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6137 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
6138 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.[Select], true)> _
6139 Public Overloads Overridable Function GetData() As SQLServer2005DBDataSet.PersonDataTable
6140 Me.Adapter.SelectCommand = Me.CommandCollection(0)
6141 Dim dataTable As SQLServer2005DBDataSet.PersonDataTable = New SQLServer2005DBDataSet.PersonDataTable
6142 Me.Adapter.Fill(dataTable)
6143 Return dataTable
6144 End Function
6146 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6147 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
6148 Public Overloads Overridable Function Update(ByVal dataTable As SQLServer2005DBDataSet.PersonDataTable) As Integer
6149 Return Me.Adapter.Update(dataTable)
6150 End Function
6152 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6153 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
6154 Public Overloads Overridable Function Update(ByVal dataSet As SQLServer2005DBDataSet) As Integer
6155 Return Me.Adapter.Update(dataSet, "Person")
6156 End Function
6158 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6159 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
6160 Public Overloads Overridable Function Update(ByVal dataRow As Global.System.Data.DataRow) As Integer
6161 Return Me.Adapter.Update(New Global.System.Data.DataRow() {dataRow})
6162 End Function
6164 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6165 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")> _
6166 Public Overloads Overridable Function Update(ByVal dataRows() As Global.System.Data.DataRow) As Integer
6167 Return Me.Adapter.Update(dataRows)
6168 End Function
6170 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6171 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
6172 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Delete, true)> _
6173 Public Overloads Overridable Function Delete(ByVal Original_PersonID As Integer, ByVal Original_LastName As String, ByVal Original_FirstName As String, ByVal Original_HireDate As Global.System.Nullable(Of Date), ByVal Original_EnrollmentDate As Global.System.Nullable(Of Date), ByVal Original_PersonCategory As Short) As Integer
6174 Me.Adapter.DeleteCommand.Parameters(0).Value = CType(Original_PersonID,Integer)
6175 If (Original_LastName Is Nothing) Then
6176 Throw New Global.System.ArgumentNullException("Original_LastName")
6177 Else
6178 Me.Adapter.DeleteCommand.Parameters(1).Value = CType(Original_LastName,String)
6179 End If
6180 If (Original_FirstName Is Nothing) Then
6181 Throw New Global.System.ArgumentNullException("Original_FirstName")
6182 Else
6183 Me.Adapter.DeleteCommand.Parameters(2).Value = CType(Original_FirstName,String)
6184 End If
6185 If (Original_HireDate.HasValue = true) Then
6186 Me.Adapter.DeleteCommand.Parameters(3).Value = CType(0,Object)
6187 Me.Adapter.DeleteCommand.Parameters(4).Value = CType(Original_HireDate.Value,Date)
6188 Else
6189 Me.Adapter.DeleteCommand.Parameters(3).Value = CType(1,Object)
6190 Me.Adapter.DeleteCommand.Parameters(4).Value = Global.System.DBNull.Value
6191 End If
6192 If (Original_EnrollmentDate.HasValue = true) Then
6193 Me.Adapter.DeleteCommand.Parameters(5).Value = CType(0,Object)
6194 Me.Adapter.DeleteCommand.Parameters(6).Value = CType(Original_EnrollmentDate.Value,Date)
6195 Else
6196 Me.Adapter.DeleteCommand.Parameters(5).Value = CType(1,Object)
6197 Me.Adapter.DeleteCommand.Parameters(6).Value = Global.System.DBNull.Value
6198 End If
6199 Me.Adapter.DeleteCommand.Parameters(7).Value = CType(Original_PersonCategory,Short)
6200 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.DeleteCommand.Connection.State
6201 If ((Me.Adapter.DeleteCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
6202 <> Global.System.Data.ConnectionState.Open) Then
6203 Me.Adapter.DeleteCommand.Connection.Open
6204 End If
6205 Try
6206 Dim returnValue As Integer = Me.Adapter.DeleteCommand.ExecuteNonQuery
6207 Return returnValue
6208 Finally
6209 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
6210 Me.Adapter.DeleteCommand.Connection.Close
6211 End If
6212 End Try
6213 End Function
6215 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6216 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
6217 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Insert, true)> _
6218 Public Overloads Overridable Function Insert(ByVal LastName As String, ByVal FirstName As String, ByVal HireDate As Global.System.Nullable(Of Date), ByVal EnrollmentDate As Global.System.Nullable(Of Date), ByVal Picture() As Byte, ByVal PersonCategory As Short) As Integer
6219 If (LastName Is Nothing) Then
6220 Throw New Global.System.ArgumentNullException("LastName")
6221 Else
6222 Me.Adapter.InsertCommand.Parameters(0).Value = CType(LastName,String)
6223 End If
6224 If (FirstName Is Nothing) Then
6225 Throw New Global.System.ArgumentNullException("FirstName")
6226 Else
6227 Me.Adapter.InsertCommand.Parameters(1).Value = CType(FirstName,String)
6228 End If
6229 If (HireDate.HasValue = true) Then
6230 Me.Adapter.InsertCommand.Parameters(2).Value = CType(HireDate.Value,Date)
6231 Else
6232 Me.Adapter.InsertCommand.Parameters(2).Value = Global.System.DBNull.Value
6233 End If
6234 If (EnrollmentDate.HasValue = true) Then
6235 Me.Adapter.InsertCommand.Parameters(3).Value = CType(EnrollmentDate.Value,Date)
6236 Else
6237 Me.Adapter.InsertCommand.Parameters(3).Value = Global.System.DBNull.Value
6238 End If
6239 If (Picture Is Nothing) Then
6240 Me.Adapter.InsertCommand.Parameters(4).Value = Global.System.DBNull.Value
6241 Else
6242 Me.Adapter.InsertCommand.Parameters(4).Value = CType(Picture,Byte())
6243 End If
6244 Me.Adapter.InsertCommand.Parameters(5).Value = CType(PersonCategory,Short)
6245 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.InsertCommand.Connection.State
6246 If ((Me.Adapter.InsertCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
6247 <> Global.System.Data.ConnectionState.Open) Then
6248 Me.Adapter.InsertCommand.Connection.Open
6249 End If
6250 Try
6251 Dim returnValue As Integer = Me.Adapter.InsertCommand.ExecuteNonQuery
6252 Return returnValue
6253 Finally
6254 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
6255 Me.Adapter.InsertCommand.Connection.Close
6256 End If
6257 End Try
6258 End Function
6260 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6261 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
6262 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
6263 Public Overloads Overridable Function Update(ByVal LastName As String, ByVal FirstName As String, ByVal HireDate As Global.System.Nullable(Of Date), ByVal EnrollmentDate As Global.System.Nullable(Of Date), ByVal Picture() As Byte, ByVal PersonCategory As Short, ByVal Original_PersonID As Integer, ByVal Original_LastName As String, ByVal Original_FirstName As String, ByVal Original_HireDate As Global.System.Nullable(Of Date), ByVal Original_EnrollmentDate As Global.System.Nullable(Of Date), ByVal Original_PersonCategory As Short, ByVal PersonID As Integer) As Integer
6264 If (LastName Is Nothing) Then
6265 Throw New Global.System.ArgumentNullException("LastName")
6266 Else
6267 Me.Adapter.UpdateCommand.Parameters(0).Value = CType(LastName,String)
6268 End If
6269 If (FirstName Is Nothing) Then
6270 Throw New Global.System.ArgumentNullException("FirstName")
6271 Else
6272 Me.Adapter.UpdateCommand.Parameters(1).Value = CType(FirstName,String)
6273 End If
6274 If (HireDate.HasValue = true) Then
6275 Me.Adapter.UpdateCommand.Parameters(2).Value = CType(HireDate.Value,Date)
6276 Else
6277 Me.Adapter.UpdateCommand.Parameters(2).Value = Global.System.DBNull.Value
6278 End If
6279 If (EnrollmentDate.HasValue = true) Then
6280 Me.Adapter.UpdateCommand.Parameters(3).Value = CType(EnrollmentDate.Value,Date)
6281 Else
6282 Me.Adapter.UpdateCommand.Parameters(3).Value = Global.System.DBNull.Value
6283 End If
6284 If (Picture Is Nothing) Then
6285 Me.Adapter.UpdateCommand.Parameters(4).Value = Global.System.DBNull.Value
6286 Else
6287 Me.Adapter.UpdateCommand.Parameters(4).Value = CType(Picture,Byte())
6288 End If
6289 Me.Adapter.UpdateCommand.Parameters(5).Value = CType(PersonCategory,Short)
6290 Me.Adapter.UpdateCommand.Parameters(6).Value = CType(Original_PersonID,Integer)
6291 If (Original_LastName Is Nothing) Then
6292 Throw New Global.System.ArgumentNullException("Original_LastName")
6293 Else
6294 Me.Adapter.UpdateCommand.Parameters(7).Value = CType(Original_LastName,String)
6295 End If
6296 If (Original_FirstName Is Nothing) Then
6297 Throw New Global.System.ArgumentNullException("Original_FirstName")
6298 Else
6299 Me.Adapter.UpdateCommand.Parameters(8).Value = CType(Original_FirstName,String)
6300 End If
6301 If (Original_HireDate.HasValue = true) Then
6302 Me.Adapter.UpdateCommand.Parameters(9).Value = CType(0,Object)
6303 Me.Adapter.UpdateCommand.Parameters(10).Value = CType(Original_HireDate.Value,Date)
6304 Else
6305 Me.Adapter.UpdateCommand.Parameters(9).Value = CType(1,Object)
6306 Me.Adapter.UpdateCommand.Parameters(10).Value = Global.System.DBNull.Value
6307 End If
6308 If (Original_EnrollmentDate.HasValue = true) Then
6309 Me.Adapter.UpdateCommand.Parameters(11).Value = CType(0,Object)
6310 Me.Adapter.UpdateCommand.Parameters(12).Value = CType(Original_EnrollmentDate.Value,Date)
6311 Else
6312 Me.Adapter.UpdateCommand.Parameters(11).Value = CType(1,Object)
6313 Me.Adapter.UpdateCommand.Parameters(12).Value = Global.System.DBNull.Value
6314 End If
6315 Me.Adapter.UpdateCommand.Parameters(13).Value = CType(Original_PersonCategory,Short)
6316 Me.Adapter.UpdateCommand.Parameters(14).Value = CType(PersonID,Integer)
6317 Dim previousConnectionState As Global.System.Data.ConnectionState = Me.Adapter.UpdateCommand.Connection.State
6318 If ((Me.Adapter.UpdateCommand.Connection.State And Global.System.Data.ConnectionState.Open) _
6319 <> Global.System.Data.ConnectionState.Open) Then
6320 Me.Adapter.UpdateCommand.Connection.Open
6321 End If
6322 Try
6323 Dim returnValue As Integer = Me.Adapter.UpdateCommand.ExecuteNonQuery
6324 Return returnValue
6325 Finally
6326 If (previousConnectionState = Global.System.Data.ConnectionState.Closed) Then
6327 Me.Adapter.UpdateCommand.Connection.Close
6328 End If
6329 End Try
6330 End Function
6332 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6333 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter"), _
6334 Global.System.ComponentModel.DataObjectMethodAttribute(Global.System.ComponentModel.DataObjectMethodType.Update, true)> _
6335 Public Overloads Overridable Function Update(ByVal LastName As String, ByVal FirstName As String, ByVal HireDate As Global.System.Nullable(Of Date), ByVal EnrollmentDate As Global.System.Nullable(Of Date), ByVal Picture() As Byte, ByVal PersonCategory As Short, ByVal Original_PersonID As Integer, ByVal Original_LastName As String, ByVal Original_FirstName As String, ByVal Original_HireDate As Global.System.Nullable(Of Date), ByVal Original_EnrollmentDate As Global.System.Nullable(Of Date), ByVal Original_PersonCategory As Short) As Integer
6336 Return Me.Update(LastName, FirstName, HireDate, EnrollmentDate, Picture, PersonCategory, Original_PersonID, Original_LastName, Original_FirstName, Original_HireDate, Original_EnrollmentDate, Original_PersonCategory, Original_PersonID)
6337 End Function
6338 End Class
6340 '''<summary>
6341 '''TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
6342 '''</summary>
6343 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
6344 Global.System.ComponentModel.DesignerCategoryAttribute("code"), _
6345 Global.System.ComponentModel.ToolboxItem(true), _
6346 Global.System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD"& _
6347 "esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
6348 Global.System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")> _
6349 Partial Public Class TableAdapterManager
6350 Inherits Global.System.ComponentModel.Component
6352 Private _updateOrder As UpdateOrderOption
6354 Private _courseTableAdapter As CourseTableAdapter
6356 Private _courseGradeTableAdapter As CourseGradeTableAdapter
6358 Private _courseInstructorTableAdapter As CourseInstructorTableAdapter
6360 Private _departmentTableAdapter As DepartmentTableAdapter
6362 Private _officeAssignmentTableAdapter As OfficeAssignmentTableAdapter
6364 Private _onlineCourseTableAdapter As OnlineCourseTableAdapter
6366 Private _onsiteCourseTableAdapter As OnsiteCourseTableAdapter
6368 Private _personTableAdapter As PersonTableAdapter
6370 Private _backupDataSetBeforeUpdate As Boolean
6372 Private _connection As Global.System.Data.IDbConnection
6374 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
6375 Public Property UpdateOrder() As UpdateOrderOption
6377 Return Me._updateOrder
6378 End Get
6380 Me._updateOrder = value
6381 End Set
6382 End Property
6384 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6385 Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6386 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6387 "", "System.Drawing.Design.UITypeEditor")> _
6388 Public Property CourseTableAdapter() As CourseTableAdapter
6390 Return Me._courseTableAdapter
6391 End Get
6393 Me._courseTableAdapter = value
6394 End Set
6395 End Property
6397 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6398 Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6399 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6400 "", "System.Drawing.Design.UITypeEditor")> _
6401 Public Property CourseGradeTableAdapter() As CourseGradeTableAdapter
6403 Return Me._courseGradeTableAdapter
6404 End Get
6406 Me._courseGradeTableAdapter = value
6407 End Set
6408 End Property
6410 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6411 Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6412 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6413 "", "System.Drawing.Design.UITypeEditor")> _
6414 Public Property CourseInstructorTableAdapter() As CourseInstructorTableAdapter
6416 Return Me._courseInstructorTableAdapter
6417 End Get
6419 Me._courseInstructorTableAdapter = value
6420 End Set
6421 End Property
6423 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6424 Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6425 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6426 "", "System.Drawing.Design.UITypeEditor")> _
6427 Public Property DepartmentTableAdapter() As DepartmentTableAdapter
6429 Return Me._departmentTableAdapter
6430 End Get
6432 Me._departmentTableAdapter = value
6433 End Set
6434 End Property
6436 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6437 Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6438 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6439 "", "System.Drawing.Design.UITypeEditor")> _
6440 Public Property OfficeAssignmentTableAdapter() As OfficeAssignmentTableAdapter
6442 Return Me._officeAssignmentTableAdapter
6443 End Get
6445 Me._officeAssignmentTableAdapter = value
6446 End Set
6447 End Property
6449 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6450 Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6451 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6452 "", "System.Drawing.Design.UITypeEditor")> _
6453 Public Property OnlineCourseTableAdapter() As OnlineCourseTableAdapter
6455 Return Me._onlineCourseTableAdapter
6456 End Get
6458 Me._onlineCourseTableAdapter = value
6459 End Set
6460 End Property
6462 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6463 Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6464 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6465 "", "System.Drawing.Design.UITypeEditor")> _
6466 Public Property OnsiteCourseTableAdapter() As OnsiteCourseTableAdapter
6468 Return Me._onsiteCourseTableAdapter
6469 End Get
6471 Me._onsiteCourseTableAdapter = value
6472 End Set
6473 End Property
6475 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6476 Global.System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6477 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6478 "", "System.Drawing.Design.UITypeEditor")> _
6479 Public Property PersonTableAdapter() As PersonTableAdapter
6481 Return Me._personTableAdapter
6482 End Get
6484 Me._personTableAdapter = value
6485 End Set
6486 End Property
6488 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
6489 Public Property BackupDataSetBeforeUpdate() As Boolean
6491 Return Me._backupDataSetBeforeUpdate
6492 End Get
6494 Me._backupDataSetBeforeUpdate = value
6495 End Set
6496 End Property
6498 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6499 Global.System.ComponentModel.Browsable(false)> _
6500 Public Property Connection() As Global.System.Data.IDbConnection
6502 If (Not (Me._connection) Is Nothing) Then
6503 Return Me._connection
6504 End If
6505 If ((Not (Me._courseTableAdapter) Is Nothing) _
6506 AndAlso (Not (Me._courseTableAdapter.Connection) Is Nothing)) Then
6507 Return Me._courseTableAdapter.Connection
6508 End If
6509 If ((Not (Me._courseGradeTableAdapter) Is Nothing) _
6510 AndAlso (Not (Me._courseGradeTableAdapter.Connection) Is Nothing)) Then
6511 Return Me._courseGradeTableAdapter.Connection
6512 End If
6513 If ((Not (Me._courseInstructorTableAdapter) Is Nothing) _
6514 AndAlso (Not (Me._courseInstructorTableAdapter.Connection) Is Nothing)) Then
6515 Return Me._courseInstructorTableAdapter.Connection
6516 End If
6517 If ((Not (Me._departmentTableAdapter) Is Nothing) _
6518 AndAlso (Not (Me._departmentTableAdapter.Connection) Is Nothing)) Then
6519 Return Me._departmentTableAdapter.Connection
6520 End If
6521 If ((Not (Me._officeAssignmentTableAdapter) Is Nothing) _
6522 AndAlso (Not (Me._officeAssignmentTableAdapter.Connection) Is Nothing)) Then
6523 Return Me._officeAssignmentTableAdapter.Connection
6524 End If
6525 If ((Not (Me._onlineCourseTableAdapter) Is Nothing) _
6526 AndAlso (Not (Me._onlineCourseTableAdapter.Connection) Is Nothing)) Then
6527 Return Me._onlineCourseTableAdapter.Connection
6528 End If
6529 If ((Not (Me._onsiteCourseTableAdapter) Is Nothing) _
6530 AndAlso (Not (Me._onsiteCourseTableAdapter.Connection) Is Nothing)) Then
6531 Return Me._onsiteCourseTableAdapter.Connection
6532 End If
6533 If ((Not (Me._personTableAdapter) Is Nothing) _
6534 AndAlso (Not (Me._personTableAdapter.Connection) Is Nothing)) Then
6535 Return Me._personTableAdapter.Connection
6536 End If
6537 Return Nothing
6538 End Get
6540 Me._connection = value
6541 End Set
6542 End Property
6544 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
6545 Global.System.ComponentModel.Browsable(false)> _
6546 Public ReadOnly Property TableAdapterInstanceCount() As Integer
6548 Dim count As Integer = 0
6549 If (Not (Me._courseTableAdapter) Is Nothing) Then
6550 count = (count + 1)
6551 End If
6552 If (Not (Me._courseGradeTableAdapter) Is Nothing) Then
6553 count = (count + 1)
6554 End If
6555 If (Not (Me._courseInstructorTableAdapter) Is Nothing) Then
6556 count = (count + 1)
6557 End If
6558 If (Not (Me._departmentTableAdapter) Is Nothing) Then
6559 count = (count + 1)
6560 End If
6561 If (Not (Me._officeAssignmentTableAdapter) Is Nothing) Then
6562 count = (count + 1)
6563 End If
6564 If (Not (Me._onlineCourseTableAdapter) Is Nothing) Then
6565 count = (count + 1)
6566 End If
6567 If (Not (Me._onsiteCourseTableAdapter) Is Nothing) Then
6568 count = (count + 1)
6569 End If
6570 If (Not (Me._personTableAdapter) Is Nothing) Then
6571 count = (count + 1)
6572 End If
6573 Return count
6574 End Get
6575 End Property
6577 '''<summary>
6578 '''Update rows in top-down order.
6579 '''</summary>
6580 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
6581 Private Function UpdateUpdatedRows(ByVal dataSet As SQLServer2005DBDataSet, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow), ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
6582 Dim result As Integer = 0
6583 If (Not (Me._departmentTableAdapter) Is Nothing) Then
6584 Dim updatedRows() As Global.System.Data.DataRow = dataSet.Department.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
6585 updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
6586 If ((Not (updatedRows) Is Nothing) _
6587 AndAlso (0 < updatedRows.Length)) Then
6588 result = (result + Me._departmentTableAdapter.Update(updatedRows))
6589 allChangedRows.AddRange(updatedRows)
6590 End If
6591 End If
6592 If (Not (Me._courseTableAdapter) Is Nothing) Then
6593 Dim updatedRows() As Global.System.Data.DataRow = dataSet.Course.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
6594 updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
6595 If ((Not (updatedRows) Is Nothing) _
6596 AndAlso (0 < updatedRows.Length)) Then
6597 result = (result + Me._courseTableAdapter.Update(updatedRows))
6598 allChangedRows.AddRange(updatedRows)
6599 End If
6600 End If
6601 If (Not (Me._personTableAdapter) Is Nothing) Then
6602 Dim updatedRows() As Global.System.Data.DataRow = dataSet.Person.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
6603 updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
6604 If ((Not (updatedRows) Is Nothing) _
6605 AndAlso (0 < updatedRows.Length)) Then
6606 result = (result + Me._personTableAdapter.Update(updatedRows))
6607 allChangedRows.AddRange(updatedRows)
6608 End If
6609 End If
6610 If (Not (Me._onsiteCourseTableAdapter) Is Nothing) Then
6611 Dim updatedRows() As Global.System.Data.DataRow = dataSet.OnsiteCourse.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
6612 updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
6613 If ((Not (updatedRows) Is Nothing) _
6614 AndAlso (0 < updatedRows.Length)) Then
6615 result = (result + Me._onsiteCourseTableAdapter.Update(updatedRows))
6616 allChangedRows.AddRange(updatedRows)
6617 End If
6618 End If
6619 If (Not (Me._courseGradeTableAdapter) Is Nothing) Then
6620 Dim updatedRows() As Global.System.Data.DataRow = dataSet.CourseGrade.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
6621 updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
6622 If ((Not (updatedRows) Is Nothing) _
6623 AndAlso (0 < updatedRows.Length)) Then
6624 result = (result + Me._courseGradeTableAdapter.Update(updatedRows))
6625 allChangedRows.AddRange(updatedRows)
6626 End If
6627 End If
6628 If (Not (Me._onlineCourseTableAdapter) Is Nothing) Then
6629 Dim updatedRows() As Global.System.Data.DataRow = dataSet.OnlineCourse.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
6630 updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
6631 If ((Not (updatedRows) Is Nothing) _
6632 AndAlso (0 < updatedRows.Length)) Then
6633 result = (result + Me._onlineCourseTableAdapter.Update(updatedRows))
6634 allChangedRows.AddRange(updatedRows)
6635 End If
6636 End If
6637 If (Not (Me._courseInstructorTableAdapter) Is Nothing) Then
6638 Dim updatedRows() As Global.System.Data.DataRow = dataSet.CourseInstructor.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
6639 updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
6640 If ((Not (updatedRows) Is Nothing) _
6641 AndAlso (0 < updatedRows.Length)) Then
6642 result = (result + Me._courseInstructorTableAdapter.Update(updatedRows))
6643 allChangedRows.AddRange(updatedRows)
6644 End If
6645 End If
6646 If (Not (Me._officeAssignmentTableAdapter) Is Nothing) Then
6647 Dim updatedRows() As Global.System.Data.DataRow = dataSet.OfficeAssignment.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.ModifiedCurrent)
6648 updatedRows = Me.GetRealUpdatedRows(updatedRows, allAddedRows)
6649 If ((Not (updatedRows) Is Nothing) _
6650 AndAlso (0 < updatedRows.Length)) Then
6651 result = (result + Me._officeAssignmentTableAdapter.Update(updatedRows))
6652 allChangedRows.AddRange(updatedRows)
6653 End If
6654 End If
6655 Return result
6656 End Function
6658 '''<summary>
6659 '''Insert rows in top-down order.
6660 '''</summary>
6661 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
6662 Private Function UpdateInsertedRows(ByVal dataSet As SQLServer2005DBDataSet, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
6663 Dim result As Integer = 0
6664 If (Not (Me._departmentTableAdapter) Is Nothing) Then
6665 Dim addedRows() As Global.System.Data.DataRow = dataSet.Department.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
6666 If ((Not (addedRows) Is Nothing) _
6667 AndAlso (0 < addedRows.Length)) Then
6668 result = (result + Me._departmentTableAdapter.Update(addedRows))
6669 allAddedRows.AddRange(addedRows)
6670 End If
6671 End If
6672 If (Not (Me._courseTableAdapter) Is Nothing) Then
6673 Dim addedRows() As Global.System.Data.DataRow = dataSet.Course.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
6674 If ((Not (addedRows) Is Nothing) _
6675 AndAlso (0 < addedRows.Length)) Then
6676 result = (result + Me._courseTableAdapter.Update(addedRows))
6677 allAddedRows.AddRange(addedRows)
6678 End If
6679 End If
6680 If (Not (Me._personTableAdapter) Is Nothing) Then
6681 Dim addedRows() As Global.System.Data.DataRow = dataSet.Person.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
6682 If ((Not (addedRows) Is Nothing) _
6683 AndAlso (0 < addedRows.Length)) Then
6684 result = (result + Me._personTableAdapter.Update(addedRows))
6685 allAddedRows.AddRange(addedRows)
6686 End If
6687 End If
6688 If (Not (Me._onsiteCourseTableAdapter) Is Nothing) Then
6689 Dim addedRows() As Global.System.Data.DataRow = dataSet.OnsiteCourse.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
6690 If ((Not (addedRows) Is Nothing) _
6691 AndAlso (0 < addedRows.Length)) Then
6692 result = (result + Me._onsiteCourseTableAdapter.Update(addedRows))
6693 allAddedRows.AddRange(addedRows)
6694 End If
6695 End If
6696 If (Not (Me._courseGradeTableAdapter) Is Nothing) Then
6697 Dim addedRows() As Global.System.Data.DataRow = dataSet.CourseGrade.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
6698 If ((Not (addedRows) Is Nothing) _
6699 AndAlso (0 < addedRows.Length)) Then
6700 result = (result + Me._courseGradeTableAdapter.Update(addedRows))
6701 allAddedRows.AddRange(addedRows)
6702 End If
6703 End If
6704 If (Not (Me._onlineCourseTableAdapter) Is Nothing) Then
6705 Dim addedRows() As Global.System.Data.DataRow = dataSet.OnlineCourse.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
6706 If ((Not (addedRows) Is Nothing) _
6707 AndAlso (0 < addedRows.Length)) Then
6708 result = (result + Me._onlineCourseTableAdapter.Update(addedRows))
6709 allAddedRows.AddRange(addedRows)
6710 End If
6711 End If
6712 If (Not (Me._courseInstructorTableAdapter) Is Nothing) Then
6713 Dim addedRows() As Global.System.Data.DataRow = dataSet.CourseInstructor.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
6714 If ((Not (addedRows) Is Nothing) _
6715 AndAlso (0 < addedRows.Length)) Then
6716 result = (result + Me._courseInstructorTableAdapter.Update(addedRows))
6717 allAddedRows.AddRange(addedRows)
6718 End If
6719 End If
6720 If (Not (Me._officeAssignmentTableAdapter) Is Nothing) Then
6721 Dim addedRows() As Global.System.Data.DataRow = dataSet.OfficeAssignment.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Added)
6722 If ((Not (addedRows) Is Nothing) _
6723 AndAlso (0 < addedRows.Length)) Then
6724 result = (result + Me._officeAssignmentTableAdapter.Update(addedRows))
6725 allAddedRows.AddRange(addedRows)
6726 End If
6727 End If
6728 Return result
6729 End Function
6731 '''<summary>
6732 '''Delete rows in bottom-up order.
6733 '''</summary>
6734 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
6735 Private Function UpdateDeletedRows(ByVal dataSet As SQLServer2005DBDataSet, ByVal allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Integer
6736 Dim result As Integer = 0
6737 If (Not (Me._officeAssignmentTableAdapter) Is Nothing) Then
6738 Dim deletedRows() As Global.System.Data.DataRow = dataSet.OfficeAssignment.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
6739 If ((Not (deletedRows) Is Nothing) _
6740 AndAlso (0 < deletedRows.Length)) Then
6741 result = (result + Me._officeAssignmentTableAdapter.Update(deletedRows))
6742 allChangedRows.AddRange(deletedRows)
6743 End If
6744 End If
6745 If (Not (Me._courseInstructorTableAdapter) Is Nothing) Then
6746 Dim deletedRows() As Global.System.Data.DataRow = dataSet.CourseInstructor.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
6747 If ((Not (deletedRows) Is Nothing) _
6748 AndAlso (0 < deletedRows.Length)) Then
6749 result = (result + Me._courseInstructorTableAdapter.Update(deletedRows))
6750 allChangedRows.AddRange(deletedRows)
6751 End If
6752 End If
6753 If (Not (Me._onlineCourseTableAdapter) Is Nothing) Then
6754 Dim deletedRows() As Global.System.Data.DataRow = dataSet.OnlineCourse.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
6755 If ((Not (deletedRows) Is Nothing) _
6756 AndAlso (0 < deletedRows.Length)) Then
6757 result = (result + Me._onlineCourseTableAdapter.Update(deletedRows))
6758 allChangedRows.AddRange(deletedRows)
6759 End If
6760 End If
6761 If (Not (Me._courseGradeTableAdapter) Is Nothing) Then
6762 Dim deletedRows() As Global.System.Data.DataRow = dataSet.CourseGrade.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
6763 If ((Not (deletedRows) Is Nothing) _
6764 AndAlso (0 < deletedRows.Length)) Then
6765 result = (result + Me._courseGradeTableAdapter.Update(deletedRows))
6766 allChangedRows.AddRange(deletedRows)
6767 End If
6768 End If
6769 If (Not (Me._onsiteCourseTableAdapter) Is Nothing) Then
6770 Dim deletedRows() As Global.System.Data.DataRow = dataSet.OnsiteCourse.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
6771 If ((Not (deletedRows) Is Nothing) _
6772 AndAlso (0 < deletedRows.Length)) Then
6773 result = (result + Me._onsiteCourseTableAdapter.Update(deletedRows))
6774 allChangedRows.AddRange(deletedRows)
6775 End If
6776 End If
6777 If (Not (Me._personTableAdapter) Is Nothing) Then
6778 Dim deletedRows() As Global.System.Data.DataRow = dataSet.Person.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
6779 If ((Not (deletedRows) Is Nothing) _
6780 AndAlso (0 < deletedRows.Length)) Then
6781 result = (result + Me._personTableAdapter.Update(deletedRows))
6782 allChangedRows.AddRange(deletedRows)
6783 End If
6784 End If
6785 If (Not (Me._courseTableAdapter) Is Nothing) Then
6786 Dim deletedRows() As Global.System.Data.DataRow = dataSet.Course.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
6787 If ((Not (deletedRows) Is Nothing) _
6788 AndAlso (0 < deletedRows.Length)) Then
6789 result = (result + Me._courseTableAdapter.Update(deletedRows))
6790 allChangedRows.AddRange(deletedRows)
6791 End If
6792 End If
6793 If (Not (Me._departmentTableAdapter) Is Nothing) Then
6794 Dim deletedRows() As Global.System.Data.DataRow = dataSet.Department.Select(Nothing, Nothing, Global.System.Data.DataViewRowState.Deleted)
6795 If ((Not (deletedRows) Is Nothing) _
6796 AndAlso (0 < deletedRows.Length)) Then
6797 result = (result + Me._departmentTableAdapter.Update(deletedRows))
6798 allChangedRows.AddRange(deletedRows)
6799 End If
6800 End If
6801 Return result
6802 End Function
6804 '''<summary>
6805 '''Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
6806 '''</summary>
6807 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
6808 Private Function GetRealUpdatedRows(ByVal updatedRows() As Global.System.Data.DataRow, ByVal allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)) As Global.System.Data.DataRow()
6809 If ((updatedRows Is Nothing) _
6810 OrElse (updatedRows.Length < 1)) Then
6811 Return updatedRows
6812 End If
6813 If ((allAddedRows Is Nothing) _
6814 OrElse (allAddedRows.Count < 1)) Then
6815 Return updatedRows
6816 End If
6817 Dim realUpdatedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)
6818 Dim i As Integer = 0
6819 Do While (i < updatedRows.Length)
6820 Dim row As Global.System.Data.DataRow = updatedRows(i)
6821 If (allAddedRows.Contains(row) = false) Then
6822 realUpdatedRows.Add(row)
6823 End If
6824 i = (i + 1)
6825 Loop
6826 Return realUpdatedRows.ToArray
6827 End Function
6829 '''<summary>
6830 '''Update all changes to the dataset.
6831 '''</summary>
6832 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
6833 Public Overridable Function UpdateAll(ByVal dataSet As SQLServer2005DBDataSet) As Integer
6834 If (dataSet Is Nothing) Then
6835 Throw New Global.System.ArgumentNullException("dataSet")
6836 End If
6837 If (dataSet.HasChanges = false) Then
6838 Return 0
6839 End If
6840 If ((Not (Me._courseTableAdapter) Is Nothing) _
6841 AndAlso (Me.MatchTableAdapterConnection(Me._courseTableAdapter.Connection) = false)) Then
6842 Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6843 "tring.")
6844 End If
6845 If ((Not (Me._courseGradeTableAdapter) Is Nothing) _
6846 AndAlso (Me.MatchTableAdapterConnection(Me._courseGradeTableAdapter.Connection) = false)) Then
6847 Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6848 "tring.")
6849 End If
6850 If ((Not (Me._courseInstructorTableAdapter) Is Nothing) _
6851 AndAlso (Me.MatchTableAdapterConnection(Me._courseInstructorTableAdapter.Connection) = false)) Then
6852 Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6853 "tring.")
6854 End If
6855 If ((Not (Me._departmentTableAdapter) Is Nothing) _
6856 AndAlso (Me.MatchTableAdapterConnection(Me._departmentTableAdapter.Connection) = false)) Then
6857 Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6858 "tring.")
6859 End If
6860 If ((Not (Me._officeAssignmentTableAdapter) Is Nothing) _
6861 AndAlso (Me.MatchTableAdapterConnection(Me._officeAssignmentTableAdapter.Connection) = false)) Then
6862 Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6863 "tring.")
6864 End If
6865 If ((Not (Me._onlineCourseTableAdapter) Is Nothing) _
6866 AndAlso (Me.MatchTableAdapterConnection(Me._onlineCourseTableAdapter.Connection) = false)) Then
6867 Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6868 "tring.")
6869 End If
6870 If ((Not (Me._onsiteCourseTableAdapter) Is Nothing) _
6871 AndAlso (Me.MatchTableAdapterConnection(Me._onsiteCourseTableAdapter.Connection) = false)) Then
6872 Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6873 "tring.")
6874 End If
6875 If ((Not (Me._personTableAdapter) Is Nothing) _
6876 AndAlso (Me.MatchTableAdapterConnection(Me._personTableAdapter.Connection) = false)) Then
6877 Throw New Global.System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6878 "tring.")
6879 End If
6880 Dim workConnection As Global.System.Data.IDbConnection = Me.Connection
6881 If (workConnection Is Nothing) Then
6882 Throw New Global.System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana"& _
6883 "ger TableAdapter property to a valid TableAdapter instance.")
6884 End If
6885 Dim workConnOpened As Boolean = false
6886 If ((workConnection.State And Global.System.Data.ConnectionState.Broken) _
6887 = Global.System.Data.ConnectionState.Broken) Then
6888 workConnection.Close
6889 End If
6890 If (workConnection.State = Global.System.Data.ConnectionState.Closed) Then
6891 workConnection.Open
6892 workConnOpened = true
6893 End If
6894 Dim workTransaction As Global.System.Data.IDbTransaction = workConnection.BeginTransaction
6895 If (workTransaction Is Nothing) Then
6896 Throw New Global.System.ApplicationException("The transaction cannot begin. The current data connection does not support transa"& _
6897 "ctions or the current state is not allowing the transaction to begin.")
6898 End If
6899 Dim allChangedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)
6900 Dim allAddedRows As Global.System.Collections.Generic.List(Of Global.System.Data.DataRow) = New Global.System.Collections.Generic.List(Of Global.System.Data.DataRow)
6901 Dim adaptersWithAcceptChangesDuringUpdate As Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter) = New Global.System.Collections.Generic.List(Of Global.System.Data.Common.DataAdapter)
6902 Dim revertConnections As Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection) = New Global.System.Collections.Generic.Dictionary(Of Object, Global.System.Data.IDbConnection)
6903 Dim result As Integer = 0
6904 Dim backupDataSet As Global.System.Data.DataSet = Nothing
6905 If Me.BackupDataSetBeforeUpdate Then
6906 backupDataSet = New Global.System.Data.DataSet
6907 backupDataSet.Merge(dataSet)
6908 End If
6909 Try
6910 '---- Prepare for update -----------
6912 If (Not (Me._courseTableAdapter) Is Nothing) Then
6913 revertConnections.Add(Me._courseTableAdapter, Me._courseTableAdapter.Connection)
6914 Me._courseTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
6915 Me._courseTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
6916 If Me._courseTableAdapter.Adapter.AcceptChangesDuringUpdate Then
6917 Me._courseTableAdapter.Adapter.AcceptChangesDuringUpdate = false
6918 adaptersWithAcceptChangesDuringUpdate.Add(Me._courseTableAdapter.Adapter)
6919 End If
6920 End If
6921 If (Not (Me._courseGradeTableAdapter) Is Nothing) Then
6922 revertConnections.Add(Me._courseGradeTableAdapter, Me._courseGradeTableAdapter.Connection)
6923 Me._courseGradeTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
6924 Me._courseGradeTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
6925 If Me._courseGradeTableAdapter.Adapter.AcceptChangesDuringUpdate Then
6926 Me._courseGradeTableAdapter.Adapter.AcceptChangesDuringUpdate = false
6927 adaptersWithAcceptChangesDuringUpdate.Add(Me._courseGradeTableAdapter.Adapter)
6928 End If
6929 End If
6930 If (Not (Me._courseInstructorTableAdapter) Is Nothing) Then
6931 revertConnections.Add(Me._courseInstructorTableAdapter, Me._courseInstructorTableAdapter.Connection)
6932 Me._courseInstructorTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
6933 Me._courseInstructorTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
6934 If Me._courseInstructorTableAdapter.Adapter.AcceptChangesDuringUpdate Then
6935 Me._courseInstructorTableAdapter.Adapter.AcceptChangesDuringUpdate = false
6936 adaptersWithAcceptChangesDuringUpdate.Add(Me._courseInstructorTableAdapter.Adapter)
6937 End If
6938 End If
6939 If (Not (Me._departmentTableAdapter) Is Nothing) Then
6940 revertConnections.Add(Me._departmentTableAdapter, Me._departmentTableAdapter.Connection)
6941 Me._departmentTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
6942 Me._departmentTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
6943 If Me._departmentTableAdapter.Adapter.AcceptChangesDuringUpdate Then
6944 Me._departmentTableAdapter.Adapter.AcceptChangesDuringUpdate = false
6945 adaptersWithAcceptChangesDuringUpdate.Add(Me._departmentTableAdapter.Adapter)
6946 End If
6947 End If
6948 If (Not (Me._officeAssignmentTableAdapter) Is Nothing) Then
6949 revertConnections.Add(Me._officeAssignmentTableAdapter, Me._officeAssignmentTableAdapter.Connection)
6950 Me._officeAssignmentTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
6951 Me._officeAssignmentTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
6952 If Me._officeAssignmentTableAdapter.Adapter.AcceptChangesDuringUpdate Then
6953 Me._officeAssignmentTableAdapter.Adapter.AcceptChangesDuringUpdate = false
6954 adaptersWithAcceptChangesDuringUpdate.Add(Me._officeAssignmentTableAdapter.Adapter)
6955 End If
6956 End If
6957 If (Not (Me._onlineCourseTableAdapter) Is Nothing) Then
6958 revertConnections.Add(Me._onlineCourseTableAdapter, Me._onlineCourseTableAdapter.Connection)
6959 Me._onlineCourseTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
6960 Me._onlineCourseTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
6961 If Me._onlineCourseTableAdapter.Adapter.AcceptChangesDuringUpdate Then
6962 Me._onlineCourseTableAdapter.Adapter.AcceptChangesDuringUpdate = false
6963 adaptersWithAcceptChangesDuringUpdate.Add(Me._onlineCourseTableAdapter.Adapter)
6964 End If
6965 End If
6966 If (Not (Me._onsiteCourseTableAdapter) Is Nothing) Then
6967 revertConnections.Add(Me._onsiteCourseTableAdapter, Me._onsiteCourseTableAdapter.Connection)
6968 Me._onsiteCourseTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
6969 Me._onsiteCourseTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
6970 If Me._onsiteCourseTableAdapter.Adapter.AcceptChangesDuringUpdate Then
6971 Me._onsiteCourseTableAdapter.Adapter.AcceptChangesDuringUpdate = false
6972 adaptersWithAcceptChangesDuringUpdate.Add(Me._onsiteCourseTableAdapter.Adapter)
6973 End If
6974 End If
6975 If (Not (Me._personTableAdapter) Is Nothing) Then
6976 revertConnections.Add(Me._personTableAdapter, Me._personTableAdapter.Connection)
6977 Me._personTableAdapter.Connection = CType(workConnection,Global.System.Data.SqlClient.SqlConnection)
6978 Me._personTableAdapter.Transaction = CType(workTransaction,Global.System.Data.SqlClient.SqlTransaction)
6979 If Me._personTableAdapter.Adapter.AcceptChangesDuringUpdate Then
6980 Me._personTableAdapter.Adapter.AcceptChangesDuringUpdate = false
6981 adaptersWithAcceptChangesDuringUpdate.Add(Me._personTableAdapter.Adapter)
6982 End If
6983 End If
6985 '---- Perform updates -----------
6987 If (Me.UpdateOrder = UpdateOrderOption.UpdateInsertDelete) Then
6988 result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows))
6989 result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows))
6990 Else
6991 result = (result + Me.UpdateInsertedRows(dataSet, allAddedRows))
6992 result = (result + Me.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows))
6993 End If
6994 result = (result + Me.UpdateDeletedRows(dataSet, allChangedRows))
6996 '---- Commit updates -----------
6998 workTransaction.Commit
6999 If (0 < allAddedRows.Count) Then
7000 Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow
7001 allAddedRows.CopyTo(rows)
7002 Dim i As Integer = 0
7003 Do While (i < rows.Length)
7004 Dim row As Global.System.Data.DataRow = rows(i)
7005 row.AcceptChanges
7006 i = (i + 1)
7007 Loop
7008 End If
7009 If (0 < allChangedRows.Count) Then
7010 Dim rows((allChangedRows.Count) - 1) As Global.System.Data.DataRow
7011 allChangedRows.CopyTo(rows)
7012 Dim i As Integer = 0
7013 Do While (i < rows.Length)
7014 Dim row As Global.System.Data.DataRow = rows(i)
7015 row.AcceptChanges
7016 i = (i + 1)
7017 Loop
7018 End If
7019 Catch ex As Global.System.Exception
7020 workTransaction.Rollback
7021 '---- Restore the dataset -----------
7022 If Me.BackupDataSetBeforeUpdate Then
7023 Global.System.Diagnostics.Debug.Assert((Not (backupDataSet) Is Nothing))
7024 dataSet.Clear
7025 dataSet.Merge(backupDataSet)
7026 Else
7027 If (0 < allAddedRows.Count) Then
7028 Dim rows((allAddedRows.Count) - 1) As Global.System.Data.DataRow
7029 allAddedRows.CopyTo(rows)
7030 Dim i As Integer = 0
7031 Do While (i < rows.Length)
7032 Dim row As Global.System.Data.DataRow = rows(i)
7033 row.AcceptChanges
7034 row.SetAdded
7035 i = (i + 1)
7036 Loop
7037 End If
7038 End If
7039 Throw ex
7040 Finally
7041 If workConnOpened Then
7042 workConnection.Close
7043 End If
7044 If (Not (Me._courseTableAdapter) Is Nothing) Then
7045 Me._courseTableAdapter.Connection = CType(revertConnections(Me._courseTableAdapter),Global.System.Data.SqlClient.SqlConnection)
7046 Me._courseTableAdapter.Transaction = Nothing
7047 End If
7048 If (Not (Me._courseGradeTableAdapter) Is Nothing) Then
7049 Me._courseGradeTableAdapter.Connection = CType(revertConnections(Me._courseGradeTableAdapter),Global.System.Data.SqlClient.SqlConnection)
7050 Me._courseGradeTableAdapter.Transaction = Nothing
7051 End If
7052 If (Not (Me._courseInstructorTableAdapter) Is Nothing) Then
7053 Me._courseInstructorTableAdapter.Connection = CType(revertConnections(Me._courseInstructorTableAdapter),Global.System.Data.SqlClient.SqlConnection)
7054 Me._courseInstructorTableAdapter.Transaction = Nothing
7055 End If
7056 If (Not (Me._departmentTableAdapter) Is Nothing) Then
7057 Me._departmentTableAdapter.Connection = CType(revertConnections(Me._departmentTableAdapter),Global.System.Data.SqlClient.SqlConnection)
7058 Me._departmentTableAdapter.Transaction = Nothing
7059 End If
7060 If (Not (Me._officeAssignmentTableAdapter) Is Nothing) Then
7061 Me._officeAssignmentTableAdapter.Connection = CType(revertConnections(Me._officeAssignmentTableAdapter),Global.System.Data.SqlClient.SqlConnection)
7062 Me._officeAssignmentTableAdapter.Transaction = Nothing
7063 End If
7064 If (Not (Me._onlineCourseTableAdapter) Is Nothing) Then
7065 Me._onlineCourseTableAdapter.Connection = CType(revertConnections(Me._onlineCourseTableAdapter),Global.System.Data.SqlClient.SqlConnection)
7066 Me._onlineCourseTableAdapter.Transaction = Nothing
7067 End If
7068 If (Not (Me._onsiteCourseTableAdapter) Is Nothing) Then
7069 Me._onsiteCourseTableAdapter.Connection = CType(revertConnections(Me._onsiteCourseTableAdapter),Global.System.Data.SqlClient.SqlConnection)
7070 Me._onsiteCourseTableAdapter.Transaction = Nothing
7071 End If
7072 If (Not (Me._personTableAdapter) Is Nothing) Then
7073 Me._personTableAdapter.Connection = CType(revertConnections(Me._personTableAdapter),Global.System.Data.SqlClient.SqlConnection)
7074 Me._personTableAdapter.Transaction = Nothing
7075 End If
7076 If (0 < adaptersWithAcceptChangesDuringUpdate.Count) Then
7077 Dim adapters((adaptersWithAcceptChangesDuringUpdate.Count) - 1) As Global.System.Data.Common.DataAdapter
7078 adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters)
7079 Dim i As Integer = 0
7080 Do While (i < adapters.Length)
7081 Dim adapter As Global.System.Data.Common.DataAdapter = adapters(i)
7082 adapter.AcceptChangesDuringUpdate = true
7083 i = (i + 1)
7084 Loop
7085 End If
7086 End Try
7087 Return result
7088 End Function
7090 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
7091 Protected Overridable Sub SortSelfReferenceRows(ByVal rows() As Global.System.Data.DataRow, ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean)
7092 Global.System.Array.Sort(Of Global.System.Data.DataRow)(rows, New SelfReferenceComparer(relation, childFirst))
7093 End Sub
7095 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
7096 Protected Overridable Function MatchTableAdapterConnection(ByVal inputConnection As Global.System.Data.IDbConnection) As Boolean
7097 If (Not (Me._connection) Is Nothing) Then
7098 Return true
7099 End If
7100 If ((Me.Connection Is Nothing) _
7101 OrElse (inputConnection Is Nothing)) Then
7102 Return true
7103 End If
7104 If String.Equals(Me.Connection.ConnectionString, inputConnection.ConnectionString, Global.System.StringComparison.Ordinal) Then
7105 Return true
7106 End If
7107 Return false
7108 End Function
7110 '''<summary>
7111 '''Update Order Option
7112 '''</summary>
7113 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
7114 Public Enum UpdateOrderOption
7116 InsertUpdateDelete = 0
7118 UpdateInsertDelete = 1
7119 End Enum
7121 '''<summary>
7122 '''Used to sort self-referenced table's rows
7123 '''</summary>
7124 <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
7125 Private Class SelfReferenceComparer
7126 Inherits Object
7127 Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow)
7129 Private _relation As Global.System.Data.DataRelation
7131 Private _childFirst As Integer
7133 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
7134 Friend Sub New(ByVal relation As Global.System.Data.DataRelation, ByVal childFirst As Boolean)
7135 MyBase.New
7136 Me._relation = relation
7137 If childFirst Then
7138 Me._childFirst = -1
7139 Else
7140 Me._childFirst = 1
7141 End If
7142 End Sub
7144 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
7145 Private Function IsChildAndParent(ByVal child As Global.System.Data.DataRow, ByVal parent As Global.System.Data.DataRow) As Boolean
7146 Global.System.Diagnostics.Debug.Assert((Not (child) Is Nothing))
7147 Global.System.Diagnostics.Debug.Assert((Not (parent) Is Nothing))
7148 Dim newParent As Global.System.Data.DataRow = child.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default])
7150 Do While ((Not (newParent) Is Nothing) _
7151 AndAlso ((Object.ReferenceEquals(newParent, child) = false) _
7152 AndAlso (Object.ReferenceEquals(newParent, parent) = false)))
7153 newParent = newParent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.[Default])
7155 Loop
7156 If (newParent Is Nothing) Then
7157 newParent = child.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original)
7158 Do While ((Not (newParent) Is Nothing) _
7159 AndAlso ((Object.ReferenceEquals(newParent, child) = false) _
7160 AndAlso (Object.ReferenceEquals(newParent, parent) = false)))
7161 newParent = newParent.GetParentRow(Me._relation, Global.System.Data.DataRowVersion.Original)
7163 Loop
7164 End If
7165 If Object.ReferenceEquals(newParent, parent) Then
7166 Return true
7167 End If
7168 Return false
7169 End Function
7171 <Global.System.Diagnostics.DebuggerNonUserCodeAttribute()> _
7172 Public Function Compare(ByVal row1 As Global.System.Data.DataRow, ByVal row2 As Global.System.Data.DataRow) As Integer Implements Global.System.Collections.Generic.IComparer(Of Global.System.Data.DataRow).Compare
7173 If Object.ReferenceEquals(row1, row2) Then
7174 Return 0
7175 End If
7176 If (row1 Is Nothing) Then
7177 Return -1
7178 End If
7179 If (row2 Is Nothing) Then
7180 Return 1
7181 End If
7183 'Is row1 the child or grandchild of row2
7184 If Me.IsChildAndParent(row1, row2) Then
7185 Return Me._childFirst
7186 End If
7188 'Is row2 the child or grandchild of row1
7189 If Me.IsChildAndParent(row2, row1) Then
7190 Return (-1 * Me._childFirst)
7191 End If
7192 Return 0
7193 End Function
7194 End Class
7195 End Class
7196 End Namespace